Class: ClientBasicAuthHandler

Defines the Basic Auth handler for client authentication.

Constructor

Initializes the http:ClientBasicAuthHandler object.

init (CredentialsConfig config)

Methods

enrich

Enrich the request with the relevant authentication requirements.

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

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