AuthenticationHeaderParser.ParseAuthenticationHeadersAsync 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.
Overloads
ParseAuthenticationHeadersAsync(String, CancellationToken) |
Creates the authentication parameters by attempting to call the resource unauthenticated and analyzing the response. |
ParseAuthenticationHeadersAsync(String, HttpClient, CancellationToken) |
Creates the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. |
ParseAuthenticationHeadersAsync(String, CancellationToken)
Creates the authentication parameters by attempting to call the resource unauthenticated and analyzing the response.
public static System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationHeaderParser> ParseAuthenticationHeadersAsync (string resourceUri, System.Threading.CancellationToken cancellationToken = default);
static member ParseAuthenticationHeadersAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationHeaderParser>
Public Shared Function ParseAuthenticationHeadersAsync (resourceUri As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AuthenticationHeaderParser)
Parameters
- resourceUri
- String
Resource URI.
- cancellationToken
- CancellationToken
Cancellation token to cancel the operation.
Returns
An instance of AuthenticationHeaderParser containing authentication header data.
Applies to
ParseAuthenticationHeadersAsync(String, HttpClient, CancellationToken)
Creates the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response.
public static System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationHeaderParser> ParseAuthenticationHeadersAsync (string resourceUri, System.Net.Http.HttpClient httpClient, System.Threading.CancellationToken cancellationToken = default);
static member ParseAuthenticationHeadersAsync : string * System.Net.Http.HttpClient * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationHeaderParser>
Public Shared Function ParseAuthenticationHeadersAsync (resourceUri As String, httpClient As HttpClient, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AuthenticationHeaderParser)
Parameters
- resourceUri
- String
Resource URI.
- httpClient
- HttpClient
Instance of HttpClient to make the request with.
- cancellationToken
- CancellationToken
Cancellation token to cancel the operation.
Returns
An instance of AuthenticationHeaderParser containing authentication header data.
Exceptions
Thrown if the resourceUri
or httpClient
is null.