Share via


TypedResults.Challenge(AuthenticationProperties, IList<String>) Method

Definition

Creates a ChallengeHttpResult that on execution invokes ChallengeAsync(HttpContext, String, AuthenticationProperties).

The behavior of this method depends on the IAuthenticationService in use. Status401Unauthorized and Status403Forbidden are among likely status results.

public static Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult Challenge (Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties = default, System.Collections.Generic.IList<string>? authenticationSchemes = default);
static member Challenge : Microsoft.AspNetCore.Authentication.AuthenticationProperties * System.Collections.Generic.IList<string> -> Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult
Public Shared Function Challenge (Optional properties As AuthenticationProperties = Nothing, Optional authenticationSchemes As IList(Of String) = Nothing) As ChallengeHttpResult

Parameters

properties
AuthenticationProperties

AuthenticationProperties used to perform the authentication challenge.

authenticationSchemes
IList<String>

The authentication schemes to challenge.

Returns

The created ChallengeHttpResult for the response.

Applies to