You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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
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):
Hopefully this can be simulated so serverless-offline behavior matches.
The text was updated successfully, but these errors were encountered: