Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Seeking guidance on using PostMarshallHttpAuthenticationFeature with Minimal API #1679

Answered by normj
AdalbertKhoolsaat asked this question in Q&A
Discussion options

Grateful for the release of the .NET 8 managed runtime for Lambda, I set out to upgrade a number of our Lambdas.
One particular Web API (originally built in .NET 3.1) was set up with a custom implementation of the PostMarshallHttpAuthenticationFeature-override method on the LambdaEntryPoint-class, to allow proper interpretation of incoming APIGatewayCustomAuthorizerContext.

However, it is unclear to me how to migrate this logic over to a Minimal API setup.

The underlying (base) classes are ultimately the same, but I can't find out how I am supposed to use this override method, and whether or not this is even intended in a Minimal API setting.

Any suggestions are welcome!

You must be logged in to vote

@ashishdhingra is correct, we haven't provided a mechanism yet for overriding the same PostX methods that are overridable when using the non-minimal api approach. We need to figure a pattern for users to inject their lambda function sub class instead of using the enum for the AddAWSLamdbaHosting.

Replies: 3 comments

Comment options

@AdalbertKhoolsaat Looking at the AddAWSLambdaHosting extension methods in ServiceCollectionExtensions class, I don't see any option in HostingOptions to specify PostMarshallHttpAuthenticationFeature override.

CC @normj for inputs if this is a feature request.

You must be logged in to vote
0 replies
Comment options

@ashishdhingra is correct, we haven't provided a mechanism yet for overriding the same PostX methods that are overridable when using the non-minimal api approach. We need to figure a pattern for users to inject their lambda function sub class instead of using the enum for the AddAWSLamdbaHosting.

You must be logged in to vote
0 replies
Answer selected by ashishdhingra
Comment options

This is a blocker for our migration to minimal API as well for a bunch of our lambdas.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. annotations

AltStyle によって変換されたページ (->オリジナル) /