Freigeben über


AbstractConfidentialClientAcquireTokenParameterBuilderExtension.OnBeforeTokenRequest<T> Method

Definition

Intervenes in the request pipeline, by executing a user provided delegate before MSAL makes the token request. The delegate can modify the request payload by adding or removing body parameters and headers. OnBeforeTokenRequestData

public static Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<T> OnBeforeTokenRequest<T> (this Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<T> builder, Func<Microsoft.Identity.Client.Extensibility.OnBeforeTokenRequestData,System.Threading.Tasks.Task> onBeforeTokenRequestHandler) where T : Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<T>;
static member OnBeforeTokenRequest : Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<'T (requires 'T :> Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<'T>)> * Func<Microsoft.Identity.Client.Extensibility.OnBeforeTokenRequestData, System.Threading.Tasks.Task> -> Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<'T (requires 'T :> Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<'T>)> (requires 'T :> Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder<'T>)
<Extension()>
Public Function OnBeforeTokenRequest(Of T As AbstractAcquireTokenParameterBuilder(Of T)) (builder As AbstractAcquireTokenParameterBuilder(Of T), onBeforeTokenRequestHandler As Func(Of OnBeforeTokenRequestData, Task)) As AbstractAcquireTokenParameterBuilder(Of T)

Type Parameters

T

Parameters

builder
AbstractAcquireTokenParameterBuilder<T>

The builder to chain options to

onBeforeTokenRequestHandler
Func<OnBeforeTokenRequestData,Task>

An async delegate which gets invoked just before MSAL makes a token request

Returns

The builder to chain other options to.

Applies to