Class: ListenerJwtAuthHandler
Isolated
Defines the JWT auth handler for listener authentication.
Constructor
Initializes the JWT auth handler for the listener authentication.
init (JwtValidatorConfig config)
- config JwtValidatorConfig
JWT validator configurations
Methods
authenticate | Authenticates with the relevant authentication requirements. |
authorize | Authorizes with the relevant authorization requirements. |
authenticate
function authenticate(map<string | string[ ]> headers) returns Payload | UnauthenticatedError
Isolated Function
Authenticates with the relevant authentication requirements.
Return Type
(Payload | UnauthenticatedError)The jwt:Payload
instance or else an grpc:UnauthenticatedError
error
authorize
function authorize(Payload jwtPayload, string | string[ ] expectedScopes) returns PermissionDeniedError?
Isolated Function
Authorizes with the relevant authorization requirements.
Parameters
- jwtPayload Payload
The jwt:Payload
instance which is received from authentication results
Return Type
(PermissionDeniedError?)()
, if it is successful or else a grpc:PermissionDeniedError
error