AbstractConfidentialClientAcquireTokenParameterBuilderExtension.OnBeforeTokenRequest<T> 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.
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
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈