aws-appsync-identity-typescript-guard
v1.0.1
Published
A typescript custom guard to check the AppSync Identity of a certain type
Downloads
59
Maintainers
Readme
aws-appsync-identity-typescript-guard
Simple Typescript Library to check the type AppsyncIdentity before use.
Examples
IAM
if (isIAMAppsyncIdentity(identity)) {
// do something with IAM Identity
}
Cognito
if (isCognitoAppsyncIdentity(identity)) {
// do something with Cognito Identity
}
OIDC
if (isAppSyncIdentityOIDC(identity)) {
// do something with OIDC Identity
}
Lambda Authorization
if (isAppSyncIdentityLambda(identity)) {
// do something with Lambda Authorization
}