← 返回首页
GitHub - serverlessbuch/jwtAuthorizr: Custom JSON-Web-Token AWS Lambda Authorizer function for Amazon API Gateway with Bearer JWT · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
This repository was archived by the owner on Jul 16, 2022. It is now read-only.

serverlessbuch/jwtAuthorizr

 master
Go to file
Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
View all files

Repository files navigation

More items

jwtAuthorizer - Custom JWT AWS Lambda Authorizer for Amazon API Gateway

A Custom Authorizer AWS Lambda function for Amazon API Gateway which takes a JSON Web Token (JWT) in Bearer format from Authorization HTTP header.

Read more about Custom Authorizers at AWS Docs.

The JWT is verified against a secret (in case of HSA encryption) and some other claims (should be at least audience and issuer).

The jwtAuthorizr lambda function makes use of the aweseome jsonwebtoken package at NPM.

Secret and claims can be different for every used stage environment. In this example, jwtAuthorizr lambda function reads them from environment variables which should be baked into the function deployment for each stage. But Lambda could also load them from e.g. S3 or DynamoDB or something completely different.

The token in the test event in test.json uses these secrets and claims:

  • iss: dasniko
  • aud: demo
  • secret: secret

About

Custom JSON-Web-Token AWS Lambda Authorizer function for Amazon API Gateway with Bearer JWT

Resources

License

Stars

43 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Footer

© 2026 GitHub, Inc.