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

Add support for REQUEST type Lambda Authorizers #2093

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tommie-lie
Copy link

Description

Support for REQUEST authorizers was almost there, as the type authorizer property was mostly passed through to the CloudFormation templates. This PR extends the handler middleware to also treat events of type REQUEST as authorization events. It also extends the template creation to treat TOKEN and REQUEST type authorizers equal (defaulting to TOKEN just as before).
The most significant change is in the logic how the authorization type for API routes is derived from the authorizer type: Instead of assuming CUSTOM if the type is not specified, the authorizer type correctly defaults to TOKEN. The authorization type is then mapped to CUSTOM for both, TOKEN and REQUEST authorizers.

Added unit tests and tested on live environments on AWS.

GitHub Issues

Fixes #1159

@coveralls
Copy link

coveralls commented Apr 30, 2020

Coverage Status

Coverage increased (+0.02%) to 72.982% when pulling 3c877d3 on tommie-lie:feature/request-authorizer into 80a6881 on Miserlou:master.

@rodriguesgm
Copy link

Any news on this? thanks

@mcbridet
Copy link

I'd love this too, using zappa from this PR at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Custom Authorizer of the REQUEST type
4 participants