aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

Cognito Authorizer passthrough to Authentication Middleware

Open devnull opened this issue 10 months ago • 1 comments

Describe the feature

It would be great to have some functionality to provide the JWT token that is evaluated on API Gateway by the Cognito UserPool authorizer, to be 'passed' through to the ASP.NET Authentication middleware.

Use Case

Currently, I can't test locally. I need to deploy to AWS and debug the context object by using console output and grepping logs for the context object and the details contained within, that is provided to the Lambda function by API Gateway.

I think this would be helpful for portability and testing. This would allow the application to continue using the [Authorize] attributes and minimise conditional checks whether its being tested locally or in the cloud.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

AWS .NET SDK and/or Package version used

Latest published.

Targeted .NET Platform

.NET 8

Operating System and version

Ubuntu 24.04

devnull avatar Jan 30 '25 23:01 devnull

Good feature request for https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.AspNetCoreServer/README.md per separate thread.

ashishdhingra avatar Jan 30 '25 23:01 ashishdhingra