Class: ListenerFileUserStoreBasicAuthHandler

Defines the file store Basic Auth handler for listener authentication.

Constructor

Initializes the http:ListenerFileUserStoreBasicAuthHandler object.

init (FileUserStoreConfig config)

Methods

authenticate

Authenticates with the relevant authentication requirements.

authorize

Authorizes with the relevant authorization requirements.

authenticate

function authenticate(map<string | string[ ]> headers) returns UserDetails | UnauthenticatedError
Isolated Function

Authenticates with the relevant authentication requirements.

Parameters

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

Return Type

(UserDetails | UnauthenticatedError)

The auth:UserDetails instance or else an UnauthenticatedError error

authorize

function authorize(UserDetails userDetails, string | string[ ] expectedScopes) returns PermissionDeniedError?
Isolated Function

Authorizes with the relevant authorization requirements.

Parameters

  • userDetails UserDetails
  • The auth:UserDetails instance which is received from authentication results

  • expectedScopes string | string[ ]
  • The expected scopes as string or string[]

Return Type

(PermissionDeniedError?)

(), if it is successful or else a PermissionDeniedError error