AppSyncCognitoAuthorizer is a class that extends CognitoAuthorizer and implements authentication logic for AppSync resolver events with a Cognito authorizer.
The event that triggered the authorization check.
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 AppSync event.
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
AppSyncCognitoAuthorizer is a class that extends CognitoAuthorizer and implements authentication logic for AppSync resolver events with a Cognito authorizer.