Class AbstractConfidentialClientAcquireTokenParameterBuilderExtension
- Namespace
- Microsoft.Identity.Client.Extensibility
- Assembly
- Microsoft.Identity.Client.dll
Extensions for all AcquireToken methods
public static class AbstractConfidentialClientAcquireTokenParameterBuilderExtension
- Inheritance
-
AbstractConfidentialClientAcquireTokenParameterBuilderExtension
- Inherited Members
Methods
OnBeforeTokenRequest<T>(AbstractAcquireTokenParameterBuilder<T>, Func<OnBeforeTokenRequestData, Task>)
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 AbstractAcquireTokenParameterBuilder<T> OnBeforeTokenRequest<T>(this AbstractAcquireTokenParameterBuilder<T> builder, Func<OnBeforeTokenRequestData, Task> onBeforeTokenRequestHandler) where T : AbstractAcquireTokenParameterBuilder<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
- AbstractAcquireTokenParameterBuilder<T>
The builder to chain other options to.
Type Parameters
T
WithAdditionalCacheParameters<T>(AbstractAcquireTokenParameterBuilder<T>, IEnumerable<string>)
Specifies additional parameters acquired from authentication responses to be cached with the access token that are normally not included in the cache object. these values can be read from the AdditionalResponseParameters parameter.
public static AbstractAcquireTokenParameterBuilder<T> WithAdditionalCacheParameters<T>(this AbstractAcquireTokenParameterBuilder<T> builder, IEnumerable<string> cacheParameters) where T : AbstractAcquireTokenParameterBuilder<T>
Parameters
builder
AbstractAcquireTokenParameterBuilder<T>The builder to chain options to
cacheParameters
IEnumerable<string>Additional parameters to cache
Returns
Type Parameters
T
WithProofOfPosessionKeyId<T>(AbstractAcquireTokenParameterBuilder<T>, string, string)
Binds the token to a key in the cache.No cryptographic operations is performed on the token.
public static AbstractAcquireTokenParameterBuilder<T> WithProofOfPosessionKeyId<T>(this AbstractAcquireTokenParameterBuilder<T> builder, string keyId, string expectedTokenTypeFromAad = "Bearer") where T : AbstractAcquireTokenParameterBuilder<T>
Parameters
builder
AbstractAcquireTokenParameterBuilder<T>The builder to chain options to
keyId
stringA key id to which the access token is associated. The token will not be retrieved from the cache unless the same key id is presented. Can be null.
expectedTokenTypeFromAad
stringAAD issues several types of bound tokens. MSAL checks the token type, which needs to match the value set by ESTS. Normal POP tokens have this as "pop"
Returns
- AbstractAcquireTokenParameterBuilder<T>
the builder
Type Parameters
T