Authorization header #284
-
How can you add default authorization header to domain context requests? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The most straightforward way would be to create your own DomainClientFactory and overriding the CreateChannelFactory/CreateBinding method or similar in order to setup a WCF IClientMessageInspector which adds a header (by first retreiving a HttpRequestMessageProperty from the Message's Properties) I found a similar WCF example (I think) in VB and quite long at http://ericphan.net/blog/2010/6/3/adding-custom-http-header-to-all-wcf-requests.html and on stackoverflow https://stackoverflow.com/a/7165593 |
Beta Was this translation helpful? Give feedback.
-
I updated my blazor wasm sample pr to use oauth token authentication.
…________________________________
From: Daniel Svensson ***@***.***>
Sent: Friday, May 21, 2021 8:00:55 AM
To: OpenRIAServices/OpenRiaServices ***@***.***>
Cc: dsoltesz ***@***.***>; Author ***@***.***>
Subject: Re: [OpenRIAServices/OpenRiaServices] Authorization header (#284)
The most straightforward way would be to create your own DomainClientFactory and overriding the CreateChannelFactory/CreateBinding method or similar in order to setup a WCF IClientMessageInspector<https://docs.microsoft.com/en-us/dotnet/framework/wcf/extending/how-to-inspect-or-modify-messages-on-the-client> which adds a header (by first retreiving a HttpRequestMessageProperty from the Message's Properties)
I found a similar WCF example (I think) in VB and quite long at http://ericphan.net/blog/2010/6/3/adding-custom-http-header-to-all-wcf-requests.html and on stackoverflow https://stackoverflow.com/a/7165593
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#284 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AALFFSKOOWCZMJYU23A5HW3TOZDPPANCNFSM45FLHL2A>.
|
Beta Was this translation helpful? Give feedback.
The most straightforward way would be to create your own DomainClientFactory and overriding the CreateChannelFactory/CreateBinding method or similar in order to setup a WCF IClientMessageInspector which adds a header (by first retreiving a HttpRequestMessageProperty from the Message's Properties)
I found a similar WCF example (I think) in VB and quite long at http://ericphan.net/blog/2010/6/3/adding-custom-http-header-to-all-wcf-requests.html and on stackoverflow https://stackoverflow.com/a/7165593