-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add message handlers for downstream api auth #1276
Conversation
This is for the feature request #1131 |
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.
Thanks @qetza
This looks good to me.
How would you use the message handler?
Would you have a sample app? unit tests?
Thanks!
...Identity.Web/DownstreamWebApiSupport/MicrosoftIdentityAuthenticationMessageHandlerOptions.cs
Outdated
Show resolved
Hide resolved
...ft.Identity.Web/DownstreamWebApiSupport/MicrosoftIdentityUserAuthenticationMessageHandler.cs
Show resolved
Hide resolved
Hi @jmprieur, |
Hi @jmprieur, |
Thanks @qetza |
I've rebased the code on the lastest version of |
Sorry @qetza : I missed that you had added tests. |
namespace Microsoft.Identity.Web | ||
{ | ||
/// <summary> | ||
/// A DelegatingHandler implementation that add an authorization header with a token for the application. |
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.
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.
thanks @qetza i, too, missed the updates here. Could you resolve the merge conflict and then we will merge it? thanks so much. |
@jennyf19, i've rebased the branch and fixed the merge conflict (on |
@qetza Could you provide a link to a repo where you use it? |
Hi @NWessel, You can see the code here: |
Just checked it out, looks like what i would expect it to be ^^ So baseUrl + "/.default" What is the service name for ? I'm not sure I quite understand the usecase :) |
You can always create your own extension method without a scope and do the magic in there 😄 The service name is used internally to link and retrieve the options if you have multiple clients which needs different options. |
Authentication message handlers to inject authorization header using token acquisition.