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

Authorizer claims property values should be stringified to match AWS behavior #480

Closed
chatch opened this issue Sep 14, 2018 · 2 comments
Closed

Comments

@chatch
Copy link

chatch commented Sep 14, 2018

Custom authorizer claims properties arrive at lambda function with all values stringified on AWS. However when running with serverless-offline the original value types are preserved. eg. a boolean arrives a boolean, a number a number, etc.

The docs talk about this (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html):

For the Lambda proxy integration, API Gateway passes the context object from a Lambda authorizer directly to the backend Lambda function as part of the input event. You can retrieve the context key-value pairs in the Lambda function by calling $event.requestContext.authorizer.key. For the preceding Lambda authorizer example, key is stringKey, numberKey, or booleanKey. Their values are stringified, for example, "stringval", "123", or "true", respectively.

Hopefully this can be simulated so serverless-offline behavior matches.

@chatch chatch changed the title Authorizer claims property should be stringified to match AWS behavior Authorizer claims property values should be stringified to match AWS behavior Sep 14, 2018
@christophgysin
Copy link
Contributor

This was fixed in #817. Is there still anything needed to close this?

@chatch
Copy link
Author

chatch commented Nov 5, 2019

ok great! closing.

@chatch chatch closed this as completed Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants