In a RESTful web service program, this function allows to retrieve the value associated with a Claim name of a JWT token used to authenticate the user.
Context
Java client, RESTful web service.
Parameters
ALPHA(n) |
ClaimName |
Name of the Claim for which the value must be retrieved. |
ALPHA(n) |
ClaimValue |
Result value associated with the name of the ClaimName Claim. |
BOOL |
ReturnCode |
Returns *TRUE if the name of the ClaimName Claim exists in the JWT token. |
Example
ALPHA(128) |
ClaimValue |
BOOL |
Returncode |
/* Retrieval of the value associated with the Claim named extraClaim1 contained in the JWT token used for authentication.
CALL_CLASS 'VaToolBx' 'VaToolBxAwsGetJWTClaim' 'extraClaim1' ClaimValue ReturnCode
On output, if the token used for authentication contains a Claim named extraClaim1 with the associated value john.smith@company.fr then the result parameter contains the 'john.smith@company.fr' value.
List of the VaToolBx functions by topic