Microsoft.Identity.Client.WwwAuthenticateParameters
Parameters returned by the WWW-Authenticate header. This allows for dynamic
scenarios such as Claims challenge, Continuous Access Evaluation (CAE), and Conditional Access (CA).
See https://aka.ms/msal-net/wwwAuthenticate.
AuthScheme.
See the documentation on WWW-Authenticate for more details
Authority from which to request an access token.
Claims demanded by the web API.
Error.
Return the RawParameters of key key.
The nonce acquired from the WWW-Authenticate header.
Resource for which to request scopes.
This is the App ID URI of the API that returned the WWW-Authenticate header.
Scopes to request.
If it's not provided by the web API, it's computed from the Resource.
public WwwAuthenticateParameters()
public static WwwAuthenticateParameters CreateFromAuthenticationHeaders(HttpResponseHeaders httpResponseHeaders, string scheme)
Create WWW-Authenticate parameters from the HttpResponseHeaders.
public static IReadOnlyList<WwwAuthenticateParameters> CreateFromAuthenticationHeaders(HttpResponseHeaders httpResponseHeaders)
Create WWW-Authenticate parameters from the HttpResponseHeaders for each auth scheme.
public static Task<WwwAuthenticateParameters> CreateFromAuthenticationResponseAsync(string resourceUri, string scheme, CancellationToken cancellationToken = default)
Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
public static Task<WwwAuthenticateParameters> CreateFromAuthenticationResponseAsync(string resourceUri, string scheme, HttpClient httpClient, CancellationToken cancellationToken = default)
Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
public static Task<IReadOnlyList<WwwAuthenticateParameters>> CreateFromAuthenticationResponseAsync(string resourceUri, CancellationToken cancellationToken = default)
Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
public static Task<IReadOnlyList<WwwAuthenticateParameters>> CreateFromAuthenticationResponseAsync(string resourceUri, HttpClient httpClient, CancellationToken cancellationToken = default)
Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
public static Task<WwwAuthenticateParameters> CreateFromResourceResponseAsync(string resourceUri, CancellationToken cancellationToken = default)
Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
public static Task<WwwAuthenticateParameters> CreateFromResourceResponseAsync(HttpClient httpClient, string resourceUri, CancellationToken cancellationToken = default)
Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
public static WwwAuthenticateParameters CreateFromResponseHeaders(HttpResponseHeaders httpResponseHeaders, string scheme = "Bearer")
Create WWW-Authenticate parameters from the HttpResponseHeaders.
public static WwwAuthenticateParameters CreateFromWwwAuthenticateHeaderValue(string wwwAuthenticateValue)
Creates parameters from the WWW-Authenticate string.
public static string GetClaimChallengeFromResponseHeaders(HttpResponseHeaders httpResponseHeaders, string scheme = "Bearer")
Gets the claim challenge from HTTP header.
Used, for example, for Conditional Access (CA).
Gets Azure AD tenant ID.