1.0.1 • Published 2 years ago

aws-appsync-identity-typescript-guard v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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
}