As part of a custom policy, we make a call to a Rest service. We need to send HTTP headers as part of this. Is it possible to send HTTP Headers as part of a RestfulProvider
call?
We would at least like to send Accept=application/json
to the service.
<TechnicalProfile Id="Restful-ProxyAuthValidation">
<DisplayName>Restful Claims Provider</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
<Metadata>
<Item Key="ServiceUrl">https://contoso.azurewebsites.net/api/GFAuth</Item>
<Item Key="AuthenticationType">None</Item>
<Item Key="SendClaimsIn">Body</Item>
<Item Key="issuer">https://contoso.azurewebsites.net/</Item>
</Metadata>
....
You can send the claims in headers by adding the following metadata item to the (RestfulProvider) technical profile:
<Item Key="SendClaimsIn">Header</Item>
All the InputClaims
of the technical profile will be sent in headers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With