Implements authorization on API Gateway v1 (Rest API) using JWT.
Protected
Optional
The claims of the authenticated user.
Throws a ForbiddenError if the user is not authenticated or is not an admin.
Throws an UnauthenticatedError if the user is not authenticated.
Throws a ForbiddenError if the user is not authenticated or does not belong to the specified group.
The name of the group to check.
Authenticates the user using the claims provided by the API Gateway event or by decoding a JWT token from the 'Authorization' header.
Returns the value of the claim with the specified name, or undefined if the claim does not exist.
The name of the claim to retrieve.
Returns the email of the authenticated user.
Returns an array of groups the user belongs to, or an empty array if the user is not authenticated or has no groups.
Returns the subject of the authenticated user.
Returns true if the user belongs to the specified group, false otherwise.
Returns true if the user belongs to the 'admin' group, false otherwise.
Returns true if the user is authenticated, false otherwise.
Generated using TypeDoc
Implements authorization on API Gateway v1 (Rest API) using JWT.