AcquireTokenOptionsExtensions.SetHttpRequestMessage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public static void SetHttpRequestMessage(this Microsoft.Identity.Abstractions.AcquireTokenOptions options, System.Net.Http.HttpRequestMessage httpRequestMessage);
static member SetHttpRequestMessage : Microsoft.Identity.Abstractions.AcquireTokenOptions * System.Net.Http.HttpRequestMessage -> unit
<Extension()>
Public Sub SetHttpRequestMessage (options As AcquireTokenOptions, httpRequestMessage As HttpRequestMessage)
Parameters
- options
- AcquireTokenOptions
The token acquisition options to attach the request to.
- httpRequestMessage
- HttpRequestMessage
The outgoing request whose material may be bound into the header.
Remarks
Writes to a fresh copy of ExtraParameters. Clone() shallow-copies the dictionary reference, so a per-call options object can share one instance with a DI-singleton; cloning before writing keeps this per-request value isolated to the current call and prevents concurrent acquisitions from observing each other's request.