[Migrated] Add support for REQUEST type Lambda Authorizers #847
Labels
auto-closed
[Bot] Closed, details in comments
has-pr
next-release-candidate
no-activity
[Bot] Closing soon if no new activity
Originally from: Miserlou/Zappa#2093 by tommie-lie
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
The text was updated successfully, but these errors were encountered: