Client: ListenerOAuth2Handler

Isolated

Defines the OAuth2 handler for listener authentication.

Constructor

Initializes the OAuth2 handler for the listener authentication.

init (OAuth2IntrospectionConfig config)

Remote Methods

authorize

Authorizes with the relevant authentication & authorization requirements.

authorize

function authorize(map<string | string[ ]> headers, string | string[ ]? expectedScopes, map<string>? optionalParams) returns IntrospectionResponse | UnauthenticatedError | PermissionDeniedError
Isolated Function
Remote Function

Authorizes with the relevant authentication & authorization requirements.

Parameters

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

  • expectedScopes string | string[ ]? (default ())
  • The expected scopes as string or string[]

  • optionalParams map<string>? (default ())
  • Map of optionalParams parameters that need to be sent to introspection endpoint

Return Type

(IntrospectionResponse | UnauthenticatedError | PermissionDeniedError)

The oauth2:IntrospectionResponse instance or else UnauthenticatedError or PermissionDeniedError type error