ResultContext<TOptions> 類別

定義

產生 AuthenticateResults 之事件的基底內容。

generic <typename TOptions>
 where TOptions : AuthenticationSchemeOptionspublic ref class ResultContext abstract : Microsoft::AspNetCore::Authentication::BaseContext<TOptions>
public abstract class ResultContext<TOptions> : Microsoft.AspNetCore.Authentication.BaseContext<TOptions> where TOptions : AuthenticationSchemeOptions
type ResultContext<'Options (requires 'Options :> AuthenticationSchemeOptions)> = class
    inherit BaseContext<'Options (requires 'Options :> AuthenticationSchemeOptions)>
Public MustInherit Class ResultContext(Of TOptions)
Inherits BaseContext(Of TOptions)

類型參數

TOptions
繼承
ResultContext<TOptions>
衍生

建構函式

ResultContext<TOptions>(HttpContext, AuthenticationScheme, TOptions)

初始化 ResultContext<TOptions> 的新執行個體。

屬性

HttpContext

內容。

(繼承來源 BaseContext<TOptions>)
Options

取得與配置相關聯的驗證選項。

(繼承來源 BaseContext<TOptions>)
Principal

取得或設定 ClaimsPrincipal 包含使用者宣告的 。

Properties

取得或設定 AuthenticationProperties

Request

要求。

(繼承來源 BaseContext<TOptions>)
Response

回應。

(繼承來源 BaseContext<TOptions>)
Result

AuthenticateResult取得結果。

Scheme

驗證配置。

(繼承來源 BaseContext<TOptions>)

方法

Fail(Exception)

表示驗證期間發生失敗。

Fail(String)

表示驗證期間發生失敗。

NoResult()

表示此驗證配置沒有傳回任何資訊。

Success()

使用 PrincipalProperties 呼叫成功建立票證。

適用於