theam / aws-lambda-haskell-runtime

⚡Haskell runtime for AWS Lambda
https://theam.github.io/aws-lambda-haskell-runtime/
Other
269 stars 48 forks source link

Mandatory authorizer field breaks Lambdas without authorizer #101

Closed hugoflug closed 3 years ago

hugoflug commented 3 years ago

In 8f0698f318d55ed37fae5ce5390f1085fa866039, the authorizer field was added to ApiGatewayRequestContext. However, Lambdas doesn't always have an authorizer. We have a use case where we want to do the auth-checking inside the lambda itself, and because of this change we can't use this library.

Would it be OK to open a PR to make this field a Maybe?

NickSeagull commented 3 years ago

I guess that it wouldn't be any problem, although maybe @dnikolovv could have more context than me for this

dnikolovv commented 3 years ago

I think a Maybe would work great! Sorry for the breakage :(

NickSeagull commented 3 years ago

Closed with #102