Partager via


AuthenticationHandler<TOptions> Classe

Définition

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

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 avisée pour l’implémentation de IAuthenticationHandler.

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 avisée pour l’implémentation de IAuthenticationHandler.

ClaimsIssuer

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

Clock
Obsolète.

Obtient le ISystemClock.

Context

Obtient ou définit le HttpContext.

CurrentUri

Obtient l’URL actuelle absolue.

Events

Le gestionnaire appelle des méthodes sur les événements qui donnent au contrôle d’application à certains points où le traitement se produit. S’il n’est pas fourni une instance par défaut est fournie, ce qui ne fait rien lorsque les méthodes sont appelées.

InitializeResult

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

Logger

Obtient le 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 comme indiqué par l’intergiciel d’authentification.

OriginalPathBase

Obtient la base du chemin d’accès comme indiqué par l’intergiciel d’authentification.

PriorHandler

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

Request

Obtient le HttpRequest associé à la requête actuelle.

Response

Obtient le HttpResponse associé à la requête actuelle.

Scheme

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

SignInAccepted

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

SignOutAccepted

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

TimeProvider

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

UrlEncoder

Obtient le UrlEncoder.

Méthodes

AuthenticateAsync()

Authentifiez la requête actuelle.

AuthenticateAsync(AuthenticateContext)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

BuildRedirectUri(String)

Construit une URL absolue pour l'targetPathspécifié.

ChallengeAsync(AuthenticationProperties)

Défiez la requête actuelle.

ChallengeAsync(ChallengeContext)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

CreateEventsAsync()

Crée une instance de l’instance d’événements.

FinishResponseAsync()

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

ForbidAsync(AuthenticationProperties)

Interdit la demande actuelle.

GetDescriptions(DescribeSchemesContext)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

HandleAuthenticateAsync()

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

HandleAuthenticateOnceAsync()

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

HandleAuthenticateOnceSafeAsync()

Utilisé pour 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 résultat d’authentification ayant échoué contenant l’exception.

HandleChallengeAsync(AuthenticationProperties)

Remplacez cette méthode pour résoudre les problèmes de défi 401, si un schéma d’authentification en question traite une interaction d’authentification dans le cadre du flux de demande. (comme l’ajout d’un en-tête de réponse ou la modification du résultat 401 à 302 d’une page de connexion ou d’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é 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 qu’il doit remplacer cette machine virtuelle, comparez le chemin de requête à ses chemins connus, fournissez toutes les informations de réponse appropriées et true pour arrêter le traitement ultérieur.

HandleSignInAsync(SignInContext)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

HandleSignOutAsync(SignOutContext)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

HandleUnauthorizedAsync(ChallengeContext)

Remplacez cette méthode pour résoudre les problèmes de défi 401, si un schéma d’authentification en question traite une interaction d’authentification dans le cadre du flux de demande. (comme l’ajout d’un en-tête de réponse ou la modification du résultat 401 à 302 d’une page de connexion ou d’un emplacement de connexion externe.)

InitializeAsync(AuthenticationScheme, HttpContext)

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

InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

Initialiser est appelé une fois par requête pour contextualiser cette instance avec un état approprié.

InitializeEventsAsync()

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

InitializeHandlerAsync()

Appelé après que les options/événements ont été initialisés pour que le gestionnaire termine son initialisation.

ResolveTarget(String)

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

ShouldHandleScheme(String, Boolean)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

SignInAsync(SignInContext)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

SignOutAsync(SignOutContext)

Abstraction avisée pour l’implémentation de IAuthenticationHandler.

S’applique à