Language

AcquireTokenOptionsExtensions Class

Definition

SDK-to-SDK helpers for flowing the outgoing HttpRequestMessage to a request-aware authorization header provider through ExtraParameters.

public static class AcquireTokenOptionsExtensions
type AcquireTokenOptionsExtensions = class
Public Module AcquireTokenOptionsExtensions
Inheritance
AcquireTokenOptionsExtensions

Remarks

Not meant to be used by application developers, but by other SDKs. Some protocols bind the authorization header to the outgoing request - for example a PoP SignedHttpRequest's q/h/b claims hash the request's query, headers, and body. The calling SDK sets the request before the header is created; the header-provider SDK reads it. Using the existing ExtraParameters bag avoids adding a new interface for each request-bound protocol (SHR, mTLS PoP, acquisition metadata, ...).

Methods

Name Description
GetHttpRequestMessage(AcquireTokenOptions)

Gets the outgoing HttpRequestMessage previously stored by SetHttpRequestMessage(AcquireTokenOptions, HttpRequestMessage), or null if none was set. The reader does not own the request; the SDK that created it remains responsible for disposal.

SetHttpRequestMessage(AcquireTokenOptions, HttpRequestMessage)

Stores the outgoing HttpRequestMessage so a request-aware authorization header provider can bind to it. The request's content should already be set so that body binding is accurate.

Applies to