Delegated Authorization
Overview
Delegated Auth is a way for the authentication headers to be captured and returned in an encrypted text. This text can then be used to authenticate future requests. This allows a request to be made through Salesforce through the Named Credential to generate this encrypted text. This text can then be passed into the VC UI to act as an authentication token for future requests without going through Salesforce for each request.
Setup
Delegated Auth is currently only available on API Proxies and can be enabled by setting ApiProxies__x__DelegatedAuthEnabled=true
in the app settings.
Usage
After being enabled, a new endpoint, /auth-payload
, will be available on the API Proxy path. Calling this endpoint will return JSON that includes the encrypted auth payload as well as the expiration time. The encrypted auth can then be used in future requests by populating the x-enosix-authorization
header in place of other authentication.