aws-aspnet-cognito-identity-provider | ASP.NET Core Identity Provider for Amazon Cognito | Authentication library
kandi X-RAY | aws-aspnet-cognito-identity-provider Summary
kandi X-RAY | aws-aspnet-cognito-identity-provider Summary
ASP.NET Core Identity Provider for Amazon Cognito
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aws-aspnet-cognito-identity-provider
aws-aspnet-cognito-identity-provider Key Features
aws-aspnet-cognito-identity-provider Examples and Code Snippets
Community Discussions
Trending Discussions on aws-aspnet-cognito-identity-provider
QUESTION
I am rewriting an ASP.NET Core application from being ran on lambda to run on an ECS Container. Lambda supports the claims injected from Cognito Authorizer out of the box, but Kestrel doesn't.
API requests are coming in through API Gateway, where a Cognito User Pool authorizer is validating the OAuth2 tokens and enriching the claims from the token to the httpContext.
Originally the app was running on lambda where the entry point was inheriting Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
, which extracts those claims and adds them to Request.HttpContext.User.Claims
.
Kestrel of course doesn't support that and AWS ASPNET Cognito Identity Provider seems to be meant for performing the same things that the authorizer is doing.
Solution?So I got the idea that maybe I can add some custom code to extract it. The HTTP request injected into lambda looks like this, so I expect it should be the same when it's proxied into ECS
...ANSWER
Answered 2019-May-23 at 07:31I found a different solution for this.
Instead of trying to modify the HttpContext
I map the authorizer output to request headers in the API Gateway integration. Downside of this is that each claim needs to be hardcoded as it doesn't seem to be possible to iterate over them.
Example terraform
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-aspnet-cognito-identity-provider
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page