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

Definition

Creates an IResult 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.IResult 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.IResult
Public Shared Function Challenge (Optional properties As AuthenticationProperties = Nothing, Optional authenticationSchemes As IList(Of String) = Nothing) As IResult

Parameters

properties
AuthenticationProperties

AuthenticationProperties used to perform the authentication challenge.

authenticationSchemes
IList<String>

The authentication schemes to challenge.

Returns

The created IResult for the response.

Applies to