Class: ClientBasicAuthHandler

Isolated

Defines the Basic Auth handler for client authentication.

Constructor

Initializes the Basic Auth handler for client authentication.

init (CredentialsConfig config)

Methods

enrich

Enriches the headers with the relevant authentication requirements.

enrich

function enrich(map<string | string[ ]> headers) returns map<string | string[ ]> | ClientAuthError
Isolated Function

Enriches the headers with the relevant authentication requirements.

Parameters

  • headers map<string | string[ ]>
  • The map<string|string[]> headers map as an input

Return Type

(map<string | string[ ]> | ClientAuthError)

The updated map<string|string[]> headers map instance or else a grpc:ClientAuthError in case of an error