-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request Context With Middleware Options #367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two changes:
- Change FeatureFlgs to enum flags
- Make sure that customer set ClientRequestId always win regardless of when it is set (see comments)/
Using Would it make sense to do something like this?
This would allow the graphClient instance to be created in Startup, configured and the .WithPerRequestAuthProvider() can get the instance of the AuthProvider. |
I'm aware that this is an old issue, but for someone like me, everything related to MS Graph is new. Currently this repo don't have any examples provided. Can we ask for creating them (can we create issues for that)? |
@peombwa looks like |
For anyone else looking, it is over here https://github.com/microsoftgraph/msgraph-sdk-dotnet-auth/blob/ae832dfc319f1fa06732cf0e7cadc133ddefbd93/src/Microsoft.Graph.Auth/Extensions/BaseRequestExtensions.cs |
Fixes issue #362
Changes proposed in this pull request
Adds middleware options
Customers can pass configuration options to middleware handlers using a set of pre-configured IBaseRequest extension methods to alter the handlers behaviour per request.
Adds ability to set feature flags to http client's default headers
Adds IAuthProviderOption interface
The IAuthProviderOption will be used by the auth providers to set provider specific options as part of the request.
The auth providers will expose and extension method to IBaseRequest which sets the options it needs e.g.
Adds a RequestContext object that's set on HttpRequestMessage property bag with every request
The request context contains :
Other links