AuthenticationHandler<TOptions>.HandleUnauthorizedAsync Méthode

Définition

Remplacez cette méthode pour traiter les problèmes de défi 401, si un schéma d’authentification en question traite une interaction d’authentification dans le cadre de son flux de requête. Cela s'apparente à une réponse d'en-tête ou à remplacer le résultat 401 par le résultat 302 dans une page de connexion ou à un emplacement de connexion externe.

protected:
 virtual System::Threading::Tasks::Task<bool> ^ HandleUnauthorizedAsync(Microsoft::AspNetCore::Http::Features::Authentication::ChallengeContext ^ context);
protected virtual System.Threading.Tasks.Task<bool> HandleUnauthorizedAsync (Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext context);
abstract member HandleUnauthorizedAsync : Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext -> System.Threading.Tasks.Task<bool>
override this.HandleUnauthorizedAsync : Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext -> System.Threading.Tasks.Task<bool>
Protected Overridable Function HandleUnauthorizedAsync (context As ChallengeContext) As Task(Of Boolean)

Paramètres

Retours

La valeur booléenne retournée n’est plus utilisée.

S’applique à