Partager via


OAuthHandler<TOptions> Classe

Définition

Gestionnaire d’authentification qui prend en charge OAuth.

generic <typename TOptions>
 where TOptions : OAuthOptionspublic ref class OAuthHandler : Microsoft::AspNetCore::Authentication::RemoteAuthenticationHandler<TOptions>
generic <typename TOptions>
 where TOptions : OAuthOptionsgcnew()public ref class OAuthHandler : Microsoft::AspNetCore::Authentication::RemoteAuthenticationHandler<TOptions>
public class OAuthHandler<TOptions> : Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<TOptions> where TOptions : OAuthOptions
public class OAuthHandler<TOptions> : Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<TOptions> where TOptions : OAuthOptions, new()
type OAuthHandler<'Options (requires 'Options :> OAuthOptions)> = class
    inherit RemoteAuthenticationHandler<'Options (requires 'Options :> OAuthOptions)>
type OAuthHandler<'Options (requires 'Options :> OAuthOptions and 'Options : (new : unit -> 'Options))> = class
    inherit RemoteAuthenticationHandler<'Options (requires 'Options :> OAuthOptions and 'Options : (new : unit -> 'Options))>
Public Class OAuthHandler(Of TOptions)
Inherits RemoteAuthenticationHandler(Of TOptions)

Paramètres de type

TOptions

Type d’options.

Héritage
Dérivé

Constructeurs

OAuthHandler<TOptions>(HttpClient)

Gestionnaire d’authentification qui prend en charge OAuth.

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

Initialise une nouvelle instance de OAuthHandler<TOptions>.

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

Initialise une nouvelle instance de OAuthHandler<TOptions>.

Propriétés

Backchannel

Obtient l’instance HttpClient utilisée pour communiquer avec le fournisseur d’authentification à distance.

ChallengeCalled

Gestionnaire d’authentification qui prend en charge OAuth.

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

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.

(Hérité de RemoteAuthenticationHandler<TOptions>)
InitializeResult

Gestionnaire d’authentification qui prend en charge OAuth.

(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

Gestionnaire d’authentification qui prend en charge OAuth.

(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

Gestionnaire d’authentification qui prend en charge OAuth.

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

Schéma d’authentification utilisé par défaut pour la connexion.

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

Gestionnaire d’authentification qui prend en charge OAuth.

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

Gestionnaire d’authentification qui prend en charge OAuth.

(Hérité de AuthenticationHandler<TOptions>)
BuildChallengeUrl(AuthenticationProperties, String)

Construit l’URL du défi OAuth.

BuildChallengeUrl(AuthenticationProperties, String)

Gestionnaire d’authentification qui prend en charge OAuth.

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)

Gestionnaire d’authentification qui prend en charge OAuth.

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

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

CreateEventsAsync()

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

(Hérité de RemoteAuthenticationHandler<TOptions>)
CreateTicketAsync(ClaimsIdentity, AuthenticationProperties, OAuthTokenResponse)

Gestionnaire d’authentification qui prend en charge OAuth.

CreateTicketAsync(ClaimsIdentity, AuthenticationProperties, OAuthTokenResponse)

Crée un AuthenticationTicket à partir du tokensspécifié.

ExchangeCodeAsync(OAuthCodeExchangeContext)

Échange le code d’autorisation pour un jeton d’autorisation du fournisseur distant.

ExchangeCodeAsync(String, String)

Gestionnaire d’authentification qui prend en charge OAuth.

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

Mettez en forme la propriété Scope.

FormatScope(IEnumerable<String>)

Mettez en forme une liste d’étendues OAuth.

GenerateCorrelationId(AuthenticationProperties)

Produit un cookie contenant une nonce utilisée pour mettre en corrélation la demande d’authentification distante actuelle.

(Hérité de RemoteAuthenticationHandler<TOptions>)
GenerateCorrelationId(AuthenticationProperties)

Gestionnaire d’authentification qui prend en charge OAuth.

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

Gestionnaire d’authentification qui prend en charge OAuth.

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

Les types dérivés peuvent remplacer cette méthode pour gérer les erreurs d’accès refusées.

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

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

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

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

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

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

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

Gestionnaire d’authentification qui prend en charge OAuth.

(Hérité de RemoteAuthenticationHandler<TOptions>)
HandleRemoteAuthenticateAsync()

Authentifiez l’identité de l’utilisateur auprès du fournisseur d’identité.

La méthode traite la requête sur le point de terminaison défini par CallbackPath.

HandleRemoteCallbackAsync()

Gestionnaire d’authentification qui prend en charge OAuth.

(Hérité de RemoteAuthenticationHandler<TOptions>)
HandleRequestAsync()

Gère la demande d’authentification actuelle.

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

Gestionnaire d’authentification qui prend en charge OAuth.

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

Gestionnaire d’authentification qui prend en charge OAuth.

(Hérité de RemoteAuthenticationHandler<TOptions>)
HandleUnauthorizedAsync(ChallengeContext)

Gestionnaire d’authentification qui prend en charge OAuth.

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

Obtient une valeur qui détermine si la demande d’authentification actuelle doit être gérée par HandleRequestAsync().

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

Gestionnaire d’authentification qui prend en charge OAuth.

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

Gestionnaire d’authentification qui prend en charge OAuth.

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

Gestionnaire d’authentification qui prend en charge OAuth.

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

Valide que la requête actuelle est corrélée à la demande d’authentification à distance actuelle.

(Hérité de RemoteAuthenticationHandler<TOptions>)
ValidateCorrelationId(AuthenticationProperties)

Gestionnaire d’authentification qui prend en charge OAuth.

(Hérité de RemoteAuthenticationHandler<TOptions>)

S’applique à