Partager via


JwtBearerHandler Classe

Définition

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

public ref class JwtBearerHandler : Microsoft::AspNetCore::Authentication::AuthenticationHandler<Microsoft::AspNetCore::Authentication::JwtBearer::JwtBearerOptions ^>
public class JwtBearerHandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions>
type JwtBearerHandler = class
    inherit AuthenticationHandler<JwtBearerOptions>
Public Class JwtBearerHandler
Inherits AuthenticationHandler(Of JwtBearerOptions)
Héritage

Constructeurs

JwtBearerHandler(IOptionsMonitor<JwtBearerOptions>, ILoggerFactory, UrlEncoder)

Initialise une nouvelle instance de JwtBearerHandler.

JwtBearerHandler(IOptionsMonitor<JwtBearerOptions>, ILoggerFactory, UrlEncoder, IDataProtectionProvider, ISystemClock)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

JwtBearerHandler(IOptionsMonitor<JwtBearerOptions>, ILoggerFactory, UrlEncoder, ISystemClock)
Obsolète.

Initialise une nouvelle instance de JwtBearerHandler.

Propriétés

ChallengeCalled

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

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

InitializeResult

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

(Hérité de AuthenticationHandler<TOptions>)
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 le IOptionsMonitor<TOptions> pour 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>)
PriorHandler

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

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

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

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

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

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

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

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

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

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

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

(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

AuthenticateAsync()

Authentifiez la requête actuelle.

(Hérité de AuthenticationHandler<TOptions>)
AuthenticateAsync(AuthenticateContext)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

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

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

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

Défiez la requête actuelle.

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

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

(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

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

Interdit la demande actuelle.

(Hérité de AuthenticationHandler<TOptions>)
GetDescriptions(DescribeSchemesContext)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

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

Recherche l’en-tête « Authorization » pour un jeton « Porteur ». Si le jeton « Porteur » est trouvé, il est validé à l’aide de TokenValidationParameters défini dans les options.

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 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(AuthenticationProperties)

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

(Hérité de AuthenticationHandler<TOptions>)
HandleForbiddenAsync(ChallengeContext)

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

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

(Hérité de AuthenticationHandler<TOptions>)
HandleSignInAsync(SignInContext)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

(Hérité de AuthenticationHandler<TOptions>)
HandleSignOutAsync(SignOutContext)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

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

(Hérité de AuthenticationHandler<TOptions>)
InitializeAsync(AuthenticationScheme, HttpContext)

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

(Hérité de AuthenticationHandler<TOptions>)
InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

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

(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.

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

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

(Hérité de AuthenticationHandler<TOptions>)
ShouldHandleScheme(String, Boolean)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

(Hérité de AuthenticationHandler<TOptions>)
SignInAsync(SignInContext)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

(Hérité de AuthenticationHandler<TOptions>)
SignOutAsync(SignOutContext)

Un AuthenticationHandler<TOptions> qui peut effectuer une authentification basée sur JWT.

(Hérité de AuthenticationHandler<TOptions>)

S’applique à