Functions
decode | I Decodes the provided JWT into the header and payload. |
issue | I Issues a JWT based on the provided configurations. |
validate | I Validates the provided JWT, against the provided configurations. |
decode
Isolated Function
Decodes the provided JWT into the header and payload.
1[jwt:Header, jwt:Payload] [header, payload] = check jwt:decode(jwt);
Parameters
- jwt string
JWT that needs to be decoded
issue
function issue(IssuerConfig issuerConfig) returns string | Error
Isolated Function
Issues a JWT based on the provided configurations. JWT will be signed (JWS) if crypto:KeyStore
information is
provided in the jwt:KeyStoreConfig
and the jwt:SigningAlgorithm
is not jwt:NONE
.
1string jwt = check jwt:issue(issuerConfig);
Parameters
- issuerConfig IssuerConfig
JWT issuer configurations
validate
function validate(string jwt, ValidatorConfig validatorConfig) returns Payload | Error
Isolated Function
Validates the provided JWT, against the provided configurations.
1jwt:Payload result = check jwt:validate(jwt, validatorConfig);
Parameters
- jwt string
JWT that needs to be validated
- validatorConfig ValidatorConfig
JWT validator configurations