Language

AuthorizationHeaderProviderOptions Class

Definition

Options passed-in to call downstream web APIs. To call Microsoft Graph, see rather MicrosoftGraphOptions in the Microsoft.Identity.Web.MicrosoftGraph assembly.

public class AuthorizationHeaderProviderOptions
type AuthorizationHeaderProviderOptions = class
Public Class AuthorizationHeaderProviderOptions
Inheritance
AuthorizationHeaderProviderOptions
Derived

Constructors

Name Description
AuthorizationHeaderProviderOptions()

Default constructor.

AuthorizationHeaderProviderOptions(AuthorizationHeaderProviderOptions)

Copy constructor for AuthorizationHeaderProviderOptions

Properties

Name Description
AcquireTokenOptions

Options related to token acquisition.

BaseUrl

Base URL for the called downstream web API. For instance "https://graph.microsoft.com/beta/".

CustomizeHttpRequestMessage

Provides an opportunity for the caller app to customize the HttpRequestMessage. For example, to customize the headers. This is called after the message was formed, including the Authorization header, and just before the message is sent.

HttpMethod

HTTP method used to call this downstream web API (by default Get).

OnAfterAuthHeaderCreation

Provides an opportunity for the caller app to customize the HttpRequestMessageafter the authorization header (including the Authorization header) has been set, and just before the message is sent β€” the point at which the finalized request can be read or adjusted. Provided for naming symmetry with OnBeforeAuthHeaderCreation; it shares this timing with the pre-existing CustomizeHttpRequestMessage, which continues to be invoked for backwards compatibility. When both are set they run at the same point, so callers should not depend on their relative order. Do not modify material bound by a request-binding protocol (SHR q/h/b) here, since it runs after signing; use OnBeforeAuthHeaderCreation for that.

OnBeforeAuthHeaderCreation

Provides an opportunity for the caller app to customize the HttpRequestMessagebefore the authorization header is created. At this point the Authorization header is not yet present. Use this to shape the request that a request-binding protocol signs β€” for example a SignedHttpRequest (SHR) that binds the query, headers, or body (the q/h/b claims) to the token β€” so the signature covers the finalized request. To observe or adjust the request after the header has been created, use OnAfterAuthHeaderCreation (or CustomizeHttpRequestMessage).

ProtocolScheme

Name of the protocol scheme used to create the authorization header. By default: "Bearer".

RelativePath

Path relative to the BaseUrl (for instance "me").

RequestAppToken

Describes if the downstream API is called on behalf of the calling service itself (App token) or on behalf of a user processed by the service (user token). If true, the token is requested on behalf of the app. Otherwise, it on-behalf of the user.

Methods

Name Description
Clone()

Clone the options (to be able to override them).

CloneInternal()

Clone the options (to be able to override them).

GetApiUrl()

Return the downstream web API URL.

Applies to