Client: ClientOAuth2Handler
Defines the OAuth2 handler for client authentication.
Constructor
Initializes the http:ClientOAuth2Handler
object.
init (OAuth2GrantConfig config)
- config OAuth2GrantConfig
The
http:OAuth2GrantConfig
instance
Remote Methods
enrich | Enrich the request with the relevant authentication requirements. |
Methods
enrichHeaders | Enrich the headers map with the relevant authentication requirements. |
getSecurityHeaders | Returns the headers map with the relevant authentication requirements. |
enrich
function enrich(Request req) returns Request | ClientAuthError
Enrich the request with the relevant authentication requirements.
Parameters
- req Request
The http:Request
instance
Return Type
(Request | ClientAuthError)The updated http:Request
instance or else an http:ClientAuthError
in case of an error
enrichHeaders
function enrichHeaders(map<string | string[ ]> headers) returns map<string | string[ ]> | ClientAuthError
Enrich the headers map with the relevant authentication requirements.
Return Type
(map<string | string[ ]> | ClientAuthError)The updated headers map or else an http:ClientAuthError
in case of an error
getSecurityHeaders
function getSecurityHeaders() returns map<string | string[ ]> | ClientAuthError
Returns the headers map with the relevant authentication requirements.
Return Type
(map<string | string[ ]> | ClientAuthError)The updated headers map or else an http:ClientAuthError
in case of an error