dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.74k stars 167 forks source link

AWS custom authorizer support #27

Closed jonni-larjomaa closed 7 years ago

jonni-larjomaa commented 7 years ago

Hi,

We are using APIG authorizers in our project and they were not working with serverless http, the problem is that parameters coming from APIG authorizers are coming in event.requestContext object, I can do the fixes to current Request object and send a PR.

Suggestion:

in request object the event.requestContext.auhtorizers is mapped to req.authorizers

EDIT: will close this, just figured out that I can use transformers doing this. maybe there could be a more accurate example made thou for using transformers, and that documentation should be put to the front page :)

dougmoscrop commented 7 years ago

For sure. Also feel free to re-open this and make it about the documentation instead.