Compartilhar via


TypedResults.Challenge(AuthenticationProperties, IList<String>) Método

Definição

Cria um ChallengeHttpResult que, na execução, ChallengeAsync(HttpContext, String, AuthenticationProperties)invoca .

O comportamento desse método depende do IAuthenticationService em uso. Status401Unauthorizede Status403Forbidden estão entre os resultados prováveis status.

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

Parâmetros

properties
AuthenticationProperties

AuthenticationProperties usado para executar o desafio de autenticação.

authenticationSchemes
IList<String>

Os esquemas de autenticação a serem desafiados.

Retornos

O criado ChallengeHttpResult para a resposta.

Aplica-se a