Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: AWS Lambda authorizer support #478

Merged
merged 12 commits into from
Jul 29, 2021
Prev Previous commit
Next Next commit
update integration tests instructions
  • Loading branch information
diegocstn committed Jul 27, 2021

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 34c31967ac9159d452f79cef6903e6ae73fb6e40
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
exports.handler = async (event) => {
console.log(`auth event >`, JSON.stringify(event, null, 2))
const {
authorizationToken,
requestContext: { apiId, accountId },
} = event
const response = {
isAuthorized: authorizationToken === 'custom-lambda-token',
ttlOverride: 10,
}
console.log(`response >`, JSON.stringify(response, null, 2))
return response
};