Client: ListenerOAuth2Handler

Defines the OAuth2 handler for listener authentication.

Constructor

Initializes the http:ListenerOAuth2Handler object.

init (OAuth2IntrospectionConfig config)

Remote Methods

authorize

Authorizes with the relevant authentication & authorization requirements.

authorize

function authorize(Request | Headers | string data, string | string[ ]? expectedScopes, map<string>? optionalParams) returns IntrospectionResponse | Unauthorized | Forbidden
Isolated Function
Remote Function

Authorizes with the relevant authentication & authorization requirements.

Parameters

  • data Request | Headers | string
  • The http:Request instance or http:Headers instance or string Authorization header

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

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

Return Type

(IntrospectionResponse | Unauthorized | Forbidden)

The oauth2:IntrospectionResponse instance or else Unauthorized or Forbidden type in case of an error