Langue

CookieAuthenticationHandler Classe

Définition

Implémentation du gestionnaire d’authentification basé sur les cookies.

public ref class CookieAuthenticationHandler : Microsoft::AspNetCore::Authentication::AuthenticationHandler<Microsoft::AspNetCore::Authentication::Cookies::CookieAuthenticationOptions ^>, Microsoft::AspNetCore::Authentication::IAuthenticationSignInHandler
public ref class CookieAuthenticationHandler : Microsoft::AspNetCore::Authentication::SignInAuthenticationHandler<Microsoft::AspNetCore::Authentication::Cookies::CookieAuthenticationOptions ^>
public class CookieAuthenticationHandler : Microsoft.AspNetCore.Authentication.SignInAuthenticationHandler<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
public class CookieAuthenticationHandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>, Microsoft.AspNetCore.Authentication.IAuthenticationSignInHandler
type CookieAuthenticationHandler = class
    inherit SignInAuthenticationHandler<CookieAuthenticationOptions>
type CookieAuthenticationHandler = class
    inherit AuthenticationHandler<CookieAuthenticationOptions>
    interface IAuthenticationSignInHandler
    interface IAuthenticationSignOutHandler
    interface IAuthenticationHandler
Public Class CookieAuthenticationHandler
Inherits SignInAuthenticationHandler(Of CookieAuthenticationOptions)
Public Class CookieAuthenticationHandler
Inherits AuthenticationHandler(Of CookieAuthenticationOptions)
Implements IAuthenticationSignInHandler
Héritage
Héritage
Implémente

Constructeurs

Nom Description
CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions>, ILoggerFactory, UrlEncoder, ISystemClock)
Obsolète.

Initialise une nouvelle instance de CookieAuthenticationHandler.

CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions>, ILoggerFactory, UrlEncoder)

Initialise une nouvelle instance de CookieAuthenticationHandler.

Propriétés

Nom Description
ClaimsIssuer

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

(Hérité de AuthenticationHandler<TOptions>)
Clock
Obsolète.

Obtient le ISystemClock.

(Hérité de AuthenticationHandler<TOptions>)
Context

Obtient ou définit l’instance HttpContext.

(Hérité de AuthenticationHandler<TOptions>)
CurrentUri

Obtient l’URL actuelle absolue.

(Hérité de AuthenticationHandler<TOptions>)
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.

Logger

Obtient le ILogger.

(Hérité de AuthenticationHandler<TOptions>)
Options

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

(Hérité de AuthenticationHandler<TOptions>)
OptionsMonitor

Obtient la IOptionsMonitor<TOptions> valeur permettant de détecter les modifications apportées aux options.

(Hérité de AuthenticationHandler<TOptions>)
OriginalPath

Obtient le chemin comme indiqué par l’intergiciel d’authentification.

(Hérité de AuthenticationHandler<TOptions>)
OriginalPathBase

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

(Hérité de AuthenticationHandler<TOptions>)
Request

Obtient l’associé HttpRequest à la requête actuelle.

(Hérité de AuthenticationHandler<TOptions>)
Response

Obtient l’associé HttpResponse à la requête actuelle.

(Hérité de AuthenticationHandler<TOptions>)
Scheme

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

(Hérité de AuthenticationHandler<TOptions>)
TimeProvider

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

(Hérité de AuthenticationHandler<TOptions>)
UrlEncoder

Obtient le UrlEncoder.

(Hérité de AuthenticationHandler<TOptions>)

Méthodes

Nom Description
AuthenticateAsync()

Authentifiez la requête actuelle.

(Hérité de AuthenticationHandler<TOptions>)
BuildRedirectUri(String)

Construit une URL absolue pour le targetPath.

(Hérité de AuthenticationHandler<TOptions>)
ChallengeAsync(AuthenticationProperties)

Défiez la requête actuelle.

(Hérité de AuthenticationHandler<TOptions>)
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.

(Hérité de AuthenticationHandler<TOptions>)
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.

(Hérité de AuthenticationHandler<TOptions>)
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.

(Hérité de AuthenticationHandler<TOptions>)
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 de son flux de requête (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.

HandleSignInAsync(ClaimsPrincipal, AuthenticationProperties)

Remplacez cette méthode pour gérer SignIn.

HandleSignOutAsync(AuthenticationProperties)

Remplacez cette méthode pour gérer SignOut.

InitializeAsync(AuthenticationScheme, HttpContext)

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

(Hérité de AuthenticationHandler<TOptions>)
InitializeEventsAsync()

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

(Hérité de AuthenticationHandler<TOptions>)
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.

(Hérité de AuthenticationHandler<TOptions>)
SignInAsync(ClaimsPrincipal, AuthenticationProperties)

Implémentation du gestionnaire d’authentification basé sur les cookies.

SignInAsync(ClaimsPrincipal, AuthenticationProperties)

Gérer la connexion.

(Hérité de SignInAuthenticationHandler<TOptions>)
SignOutAsync(AuthenticationProperties)

Implémentation du gestionnaire d’authentification basé sur les cookies.

SignOutAsync(AuthenticationProperties)

Comportement de déconnexion.

(Hérité de SignOutAuthenticationHandler<TOptions>)

S’applique à