AuthenticationHandler<TOptions> Classe

Définition

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

generic <typename TOptions>
 where TOptions : AuthenticationOptionspublic ref class AuthenticationHandler abstract : Microsoft::AspNetCore::Http::Features::Authentication::IAuthenticationHandler
generic <typename TOptions>
 where TOptions : AuthenticationSchemeOptionsgcnew()public ref class AuthenticationHandler abstract : Microsoft::AspNetCore::Authentication::IAuthenticationHandler
public abstract class AuthenticationHandler<TOptions> : Microsoft.AspNetCore.Http.Features.Authentication.IAuthenticationHandler where TOptions : AuthenticationOptions
public abstract class AuthenticationHandler<TOptions> : Microsoft.AspNetCore.Authentication.IAuthenticationHandler where TOptions : AuthenticationSchemeOptions, new()
type AuthenticationHandler<'Options (requires 'Options :> AuthenticationOptions)> = class
    interface IAuthenticationHandler
type AuthenticationHandler<'Options (requires 'Options :> AuthenticationSchemeOptions and 'Options : (new : unit -> 'Options))> = class
    interface IAuthenticationHandler
Public MustInherit Class AuthenticationHandler(Of TOptions)
Implements IAuthenticationHandler

Paramètres de type

TOptions

Type des options utilisées pour configurer le gestionnaire d’authentification.

Héritage
AuthenticationHandler<TOptions>
Dérivé
Implémente

Constructeurs

AuthenticationHandler<TOptions>()

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

AuthenticationHandler<TOptions>(IOptionsMonitor<TOptions>, ILoggerFactory, UrlEncoder)

Initialise une nouvelle instance de AuthenticationHandler<TOptions>.

AuthenticationHandler<TOptions>(IOptionsMonitor<TOptions>, ILoggerFactory, UrlEncoder, ISystemClock)
Obsolète.

Initialise une nouvelle instance de AuthenticationHandler<TOptions>.

Propriétés

ChallengeCalled

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

ClaimsIssuer

Obtient l’émetteur qui doit être utilisé lorsque des revendications sont émises.

Clock
Obsolète.

Obtient ISystemClock.

Context

Obtient ou définit HttpContext.

CurrentUri

Obtient l’URL actuelle absolue.

Events

Le gestionnaire appelle des méthodes sur les événements qui donnent à l’application le contrôle à certains points où le traitement se produit. En l'absence de spécification, une instance par défaut est fournie, qui n'exécute aucune action lors de l'appel des méthodes.

InitializeResult

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

Logger

Obtient ILogger.

Options

Obtient ou définit les options associées à ce gestionnaire d’authentification.

OptionsMonitor

Obtient le IOptionsMonitor<TOptions> pour détecter les modifications apportées aux options.

OriginalPath

Obtient le chemin d’accès tel que vu par le middleware d’authentification.

OriginalPathBase

Obtient la base de chemin d’accès telle que vue par l’intergiciel d’authentification.

PriorHandler

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

Request

Obtient le HttpRequest associé à la demande actuelle.

Response

Obtient le HttpResponse associé à la demande actuelle.

Scheme

Obtient ou définit l’associé AuthenticationScheme à ce gestionnaire d’authentification.

SignInAccepted

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

SignOutAccepted

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

TimeProvider

Obtient l’heure actuelle, principalement pour les tests unitaires.

UrlEncoder

Obtient UrlEncoder.

Méthodes

AuthenticateAsync()

Authentifiez la demande actuelle.

AuthenticateAsync(AuthenticateContext)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

BuildRedirectUri(String)

Construit une URL absolue pour le spécifié targetPath.

ChallengeAsync(AuthenticationProperties)

Défiez la demande actuelle.

ChallengeAsync(ChallengeContext)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

CreateEventsAsync()

Crée une instance des événements instance.

FinishResponseAsync()

Crochet appelé lorsque la réponse est sur le point d’être envoyée

ForbidAsync(AuthenticationProperties)

Interdire la demande actuelle.

GetDescriptions(DescribeSchemesContext)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

HandleAuthenticateAsync()

Permet aux types dérivés de gérer l’authentification.

HandleAuthenticateOnceAsync()

Permet de garantir que HandleAuthenticateAsync n’est appelé qu’une seule fois. Les appels suivants retournent le même résultat d’authentification.

HandleAuthenticateOnceSafeAsync()

Permet de garantir que HandleAuthenticateAsync n’est appelé qu’une seule fois en toute sécurité. Les appels suivants retournent le même résultat d’authentification. Toutes les exceptions seront converties en un résultat d’authentification ayant échoué contenant l’exception.

HandleChallengeAsync(AuthenticationProperties)

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.

HandleForbiddenAsync(AuthenticationProperties)

Remplacez cette méthode pour gérer l’interdiction.

HandleForbiddenAsync(ChallengeContext)

Remplacez cette méthode pour traiter un défi qui est interdit.

HandleRequestAsync()

Appelée une fois par code commun après l'initialisation. Si un intergiciel d’authentification répond directement aux chemins d’accès spécifiquement connus, il doit remplacer ce virtuel, comparez le chemin d’accès de la demande à ses chemins connus, fournissez les informations de réponse appropriées et true pour arrêter le traitement ultérieur.

HandleSignInAsync(SignInContext)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

HandleSignOutAsync(SignOutContext)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

HandleUnauthorizedAsync(ChallengeContext)

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.

InitializeAsync(AuthenticationScheme, HttpContext)

Initialisez le gestionnaire, résolvez les options et validez-les.

InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

Initialize est appelé une fois par demande pour contextualiser cette instance avec l’état approprié.

InitializeEventsAsync()

Initialise l’objet events, appelé une fois par requête par InitializeAsync(AuthenticationScheme, HttpContext).

InitializeHandlerAsync()

Appelé après l’initialisation des options/événements pour que le gestionnaire termine son initialisation.

ResolveTarget(String)

Résout le schéma vers lequel cette opération d’authentification est transférée.

ShouldHandleScheme(String, Boolean)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

SignInAsync(SignInContext)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

SignOutAsync(SignOutContext)

Abstraction opinionée pour l’implémentation IAuthenticationHandlerde .

S’applique à