OAuthHandler<TOptions> 类

定义

支持 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)

类型参数

TOptions

选项的类型。

继承
派生

构造函数

OAuthHandler<TOptions>(HttpClient)

支持 OAuth 的身份验证处理程序。

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

初始化 OAuthHandler<TOptions> 的新实例。

OAuthHandler<TOptions>(IOptionsMonitor<TOptions>, ILoggerFactory, UrlEncoder, ISystemClock)
已过时.

初始化 OAuthHandler<TOptions> 的新实例。

属性

Backchannel

获取 HttpClient 用于与远程身份验证提供程序通信的实例。

ChallengeCalled

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
ClaimsIssuer

获取颁发任何声明时应使用的颁发者。

(继承自 AuthenticationHandler<TOptions>)
Clock
已过时.

获取 ISystemClock

(继承自 AuthenticationHandler<TOptions>)
Context

获取或设置 HttpContext

(继承自 AuthenticationHandler<TOptions>)
CurrentUri

获取绝对当前 URL。

(继承自 AuthenticationHandler<TOptions>)
Events

处理程序对事件调用方法,这些事件在处理发生的某些点为应用程序提供控制。 如果未提供提供程序,则将提供默认实例,该实例在调用方法时不执行任何操作。

Events

处理程序对事件调用方法,这些事件在处理发生的某些点为应用程序提供控制。 如果未提供提供程序,则将提供默认实例,该实例在调用方法时不执行任何操作。

(继承自 RemoteAuthenticationHandler<TOptions>)
InitializeResult

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
Logger

获取 ILogger

(继承自 AuthenticationHandler<TOptions>)
Options

获取或设置与此身份验证处理程序关联的选项。

(继承自 AuthenticationHandler<TOptions>)
OptionsMonitor

IOptionsMonitor<TOptions>获取用于检测选项更改的 。

(继承自 AuthenticationHandler<TOptions>)
OriginalPath

获取身份验证中间件看到的路径。

(继承自 AuthenticationHandler<TOptions>)
OriginalPathBase

获取身份验证中间件所看到的路径基。

(继承自 AuthenticationHandler<TOptions>)
PriorHandler

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
Request

获取与 HttpRequest 当前请求关联的 。

(继承自 AuthenticationHandler<TOptions>)
Response

获取与 HttpResponse 当前请求关联的 。

(继承自 AuthenticationHandler<TOptions>)
Scheme

获取或设置 AuthenticationScheme 与此身份验证处理程序关联的 asss。

(继承自 AuthenticationHandler<TOptions>)
SignInAccepted

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
SignInScheme

默认情况下用于登录的身份验证方案。

(继承自 RemoteAuthenticationHandler<TOptions>)
SignOutAccepted

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
TimeProvider

获取当前时间,主要用于单元测试。

(继承自 AuthenticationHandler<TOptions>)
UrlEncoder

获取 UrlEncoder

(继承自 AuthenticationHandler<TOptions>)

方法

AuthenticateAsync()

对当前请求进行身份验证。

(继承自 AuthenticationHandler<TOptions>)
AuthenticateAsync(AuthenticateContext)

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
BuildChallengeUrl(AuthenticationProperties, String)

构造 OAuth 质询 URL。

BuildChallengeUrl(AuthenticationProperties, String)

支持 OAuth 的身份验证处理程序。

BuildRedirectUri(String)

为指定的 targetPath构造绝对 URL。

(继承自 AuthenticationHandler<TOptions>)
ChallengeAsync(AuthenticationProperties)

质询当前请求。

(继承自 AuthenticationHandler<TOptions>)
ChallengeAsync(ChallengeContext)

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
CreateEventsAsync()

创建事件实例的新实例。

CreateEventsAsync()

创建事件实例的新实例。

(继承自 RemoteAuthenticationHandler<TOptions>)
CreateTicketAsync(ClaimsIdentity, AuthenticationProperties, OAuthTokenResponse)

支持 OAuth 的身份验证处理程序。

CreateTicketAsync(ClaimsIdentity, AuthenticationProperties, OAuthTokenResponse)

AuthenticationTicket从指定的 tokens创建 。

ExchangeCodeAsync(OAuthCodeExchangeContext)

从远程提供程序交换授权令牌的授权代码。

ExchangeCodeAsync(String, String)

支持 OAuth 的身份验证处理程序。

FinishResponseAsync()

即将发送响应时调用的挂钩

(继承自 AuthenticationHandler<TOptions>)
ForbidAsync(AuthenticationProperties)

禁止当前请求。

(继承自 AuthenticationHandler<TOptions>)
FormatScope()

设置 属性的格式 Scope

FormatScope(IEnumerable<String>)

设置 OAuth 范围列表的格式。

GenerateCorrelationId(AuthenticationProperties)

生成一个 Cookie,其中包含用于关联当前远程身份验证请求的 nonce。

(继承自 RemoteAuthenticationHandler<TOptions>)
GenerateCorrelationId(AuthenticationProperties)

支持 OAuth 的身份验证处理程序。

(继承自 RemoteAuthenticationHandler<TOptions>)
GetDescriptions(DescribeSchemesContext)

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
HandleAccessDeniedErrorAsync(AuthenticationProperties)

派生类型可能会重写此方法,以处理拒绝访问错误。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleAuthenticateAsync()

允许派生类型处理身份验证。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleAuthenticateOnceAsync()

用于确保 HandleAuthenticateAsync 仅调用一次。 后续调用将返回相同的身份验证结果。

(继承自 AuthenticationHandler<TOptions>)
HandleAuthenticateOnceSafeAsync()

用于确保 HandleAuthenticateAsync 仅安全调用一次。 后续调用将返回相同的身份验证结果。 任何异常都将转换为包含异常的失败身份验证结果。

(继承自 AuthenticationHandler<TOptions>)
HandleChallengeAsync(AuthenticationProperties)

如果有问题的身份验证方案将身份验证交互作为请求流的一部分进行处理,请重写此方法来处理 401 质询问题。 (例如添加响应标头,或将 401 结果更改为登录页的 302 或外部登录位置。)

HandleChallengeAsync(AuthenticationProperties)

如果有问题的身份验证方案将身份验证交互作为请求流的一部分进行处理,请重写此方法来处理 401 质询问题。 (例如添加响应标头,或将 401 结果更改为登录页的 302 或外部登录位置。)

(继承自 AuthenticationHandler<TOptions>)
HandleForbiddenAsync(AuthenticationProperties)

重写此方法以处理 For禁止。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleForbiddenAsync(ChallengeContext)

支持 OAuth 的身份验证处理程序。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleRemoteAuthenticateAsync()

使用标识提供者对用户标识进行身份验证。

方法处理 CallbackPath 定义的终结点上的请求。

HandleRemoteCallbackAsync()

支持 OAuth 的身份验证处理程序。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleRequestAsync()

处理当前身份验证请求。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleSignInAsync(SignInContext)

支持 OAuth 的身份验证处理程序。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleSignOutAsync(SignOutContext)

支持 OAuth 的身份验证处理程序。

(继承自 RemoteAuthenticationHandler<TOptions>)
HandleUnauthorizedAsync(ChallengeContext)

支持 OAuth 的身份验证处理程序。

HandleUnauthorizedAsync(ChallengeContext)

如果有问题的身份验证方案将身份验证交互作为请求流的一部分进行处理,请重写此方法来处理 401 质询问题。 (例如添加响应标头,或将 401 结果更改为登录页的 302 或外部登录位置。)

(继承自 AuthenticationHandler<TOptions>)
InitializeAsync(AuthenticationScheme, HttpContext)

初始化处理程序,解析选项并验证它们。

(继承自 AuthenticationHandler<TOptions>)
InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

对每个请求调用一次 Initialize,以便将此实例与相应的状态进行上下文化。

(继承自 AuthenticationHandler<TOptions>)
InitializeEventsAsync()

初始化事件对象,每个请求由 InitializeAsync(AuthenticationScheme, HttpContext)调用一次。

(继承自 AuthenticationHandler<TOptions>)
InitializeHandlerAsync()

在初始化选项/事件后调用,以便处理程序完成自身初始化。

(继承自 AuthenticationHandler<TOptions>)
ResolveTarget(String)

解析此身份验证操作转发到的方案。

(继承自 AuthenticationHandler<TOptions>)
ShouldHandleRequestAsync()

获取一个值,该值确定当前身份验证请求是否应由 处理 HandleRequestAsync()

(继承自 RemoteAuthenticationHandler<TOptions>)
ShouldHandleScheme(String, Boolean)

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
SignInAsync(SignInContext)

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
SignOutAsync(SignOutContext)

支持 OAuth 的身份验证处理程序。

(继承自 AuthenticationHandler<TOptions>)
ValidateCorrelationId(AuthenticationProperties)

验证当前请求是否与当前远程身份验证请求相关联。

(继承自 RemoteAuthenticationHandler<TOptions>)
ValidateCorrelationId(AuthenticationProperties)

支持 OAuth 的身份验证处理程序。

(继承自 RemoteAuthenticationHandler<TOptions>)

适用于