Endpoint authorization. Calls a Formata endpoint, applying response fields as headers. When extending this class, implement 'dirty' and 'authWorkflow' methods.
optional
auth: PayloadAuth
Auth to use for this workflow (optional).
authWorkflow(client: FormataClient): Promise<void>
Execute auth workflow. Only happens when this is dirty.
authorize(request: FormataRequest): Promise<void>
Authorize a request. Kicks of an auth workflow if needed.
Is this auth dirty? If returns true, will call out to Formata and do the entire auth workflow.
setResponseHeaders(request: FormataRequest): void
Set response headers.