deserialization issue affecting APIGatewayCustomAuthorizerContext
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 503
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 18
Description
### Describe the bug
Not able to consume values returned by a Lambda Authorizer; they are not there even if they are present in the input JSON
### Expected Behavior
Dictionary properly set with keys and values
### Current Behavior
No values
### Reproduction Steps
Websocket API with an authorizer; try to access any authorizer context property (like principalId)
Use the new "Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer" (which is default)
### Possible Solution
As a workaround, the old "Amazon.Lambda.Serialization.Json.JsonSerializer" using the Newtonsoft library seems to work just fine.
### Additional Information/Context
using Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer
"Authorizer": {
"principalId": {
"ValueKind": 3
},
"integrationLatency": {
"ValueKind": 4
},
"authn": {
"ValueKind": 3
}
}
using the legacy Amazon.Lambda.Serialization.Json.JsonSerializer
"Authorizer": {
"principalId": "***********************",
"integrationLatency": 9516,
"authn": "None"
},
### AWS .NET SDK and/or Package version used
Amazon.Lambda.Serialization.SystemTextJson v2.3.0
### Targeted .NET Platform
.net core 3.1
### Operating System and version
any
Contributor guide
Assessment
This issue has not been assessed yet.