Client: ClientOAuth2Handler

Isolated

Defines the OAuth2 handler for client authentication.

Constructor

Initializes the http:ClientOAuth2Handler object.

init (OAuth2GrantConfig config)

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
Isolated Function
Remote Function

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
Isolated Function

Enrich the headers map with the relevant authentication requirements.

Parameters

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
Isolated Function

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