Constructs a new instance of the TokenDecoder class.
The token to be decoded.
A boolean indicating whether the token is in JWT API mode.
None
Check if the token is valid and if it has expired.
Retrieves the agency IDs from the decoded token payload.
The agency IDs if present in the decoded token payload, otherwise null.
Retrieves the brand IDs from the decoded token payload.
The brand IDs if available, otherwise null.
Retrieves the claims from the decoded token, specifically the 'cognito:groups' claim.
An array of strings representing the groups the user belongs to, or null if the claim is not present.
Retrieves the IDM groups from the decoded token payload.
The IDM groups if available, otherwise null.
Retrieves a specific parameter from the decoded token payload.
The parameter to retrieve from the decoded token payload.
The value of the specified parameter, or undefined if the parameter does not exist.
Get the raw token value.
The raw token value.
Retrieves the user's email from the decoded token.
The user's email if available, otherwise null.
Retrieves the user ID from the decoded token payload.
The user ID if present in the decoded token payload, otherwise null.
Checks if the user has a specific claim based on the claim name.
The name of the claim to check.
True if the user has the claim, false otherwise.
Checks if the token is valid by verifying if it exists, has a decoded token payload, and if the expiration time is greater than the current time.
true if the token is valid, false otherwise
Represents an SessionAuthorization class that handles authorization using JWT tokens.