aws-appsync-identity-typescript-guard
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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
}

Package Sidebar

Install

npm i aws-appsync-identity-typescript-guard

Weekly Downloads

13

Version

1.0.1

License

MIT

Unpacked Size

20.3 kB

Total Files

13

Last publish

Collaborators

  • wmmaina