語言

CookieAuthenticationHandler 類別

定義

Cookie 型驗證處理程序的實作。

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
繼承
繼承
實作

建構函式

名稱 Description
CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions>, ILoggerFactory, UrlEncoder, ISystemClock)
已淘汰.

初始化一個新的 實 CookieAuthenticationHandler例。

CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions>, ILoggerFactory, UrlEncoder)

初始化一個新的 實 CookieAuthenticationHandler例。

屬性

名稱 Description
ClaimsIssuer

取得發行任何宣告時應該使用的簽發者。

(繼承來源 AuthenticationHandler<TOptions>)
Clock
已淘汰.

取得 ISystemClock。

(繼承來源 AuthenticationHandler<TOptions>)
Context

取得或設定 HttpContext。

(繼承來源 AuthenticationHandler<TOptions>)
CurrentUri

取得絕對目前的URL。

(繼承來源 AuthenticationHandler<TOptions>)
Events

處理程式會在事件上呼叫方法,以在處理發生時的特定時間點提供應用程控。 如果未提供預設實例,則會在呼叫 方法時執行任何動作。

Logger

取得 ILogger。

(繼承來源 AuthenticationHandler<TOptions>)
Options

取得或設定與這個驗證處理程式相關聯的選項。

(繼承來源 AuthenticationHandler<TOptions>)
OptionsMonitor

能偵測 IOptionsMonitor<TOptions> 選項變更。

(繼承來源 AuthenticationHandler<TOptions>)
OriginalPath

取得驗證中間件所見的路徑。

(繼承來源 AuthenticationHandler<TOptions>)
OriginalPathBase

取得驗證中間件所見的路徑基底。

(繼承來源 AuthenticationHandler<TOptions>)
Request

會收到與目前請求相關的資訊 HttpRequest 。

(繼承來源 AuthenticationHandler<TOptions>)
Response

會收到與目前請求相關的資訊 HttpResponse 。

(繼承來源 AuthenticationHandler<TOptions>)
Scheme

取得或設定與此認證處理程序相關的 。AuthenticationScheme

(繼承來源 AuthenticationHandler<TOptions>)
TimeProvider

取得目前時間,主要是用於單元測試。

(繼承來源 AuthenticationHandler<TOptions>)
UrlEncoder

取得 UrlEncoder。

(繼承來源 AuthenticationHandler<TOptions>)

方法

名稱 Description
AuthenticateAsync()

驗證目前的要求。

(繼承來源 AuthenticationHandler<TOptions>)
BuildRedirectUri(String)

為指定的 targetPath建構一個絕對網址。

(繼承來源 AuthenticationHandler<TOptions>)
ChallengeAsync(AuthenticationProperties)

挑戰目前的要求。

(繼承來源 AuthenticationHandler<TOptions>)
CreateEventsAsync()

建立事件實例的新實例。

FinishResponseAsync()

即將傳送回應時所呼叫的勾點

ForbidAsync(AuthenticationProperties)

禁止目前的要求。

(繼承來源 AuthenticationHandler<TOptions>)
HandleAuthenticateAsync()

允許衍生類型處理驗證。

HandleAuthenticateOnceAsync()

用來確保 HandleAuthenticateAsync 只會叫用一次。 後續呼叫會傳回相同的驗證結果。

(繼承來源 AuthenticationHandler<TOptions>)
HandleAuthenticateOnceSafeAsync()

用來確保 HandleAuthenticateAsync 只會安全地叫用一次。 後續呼叫會傳回相同的驗證結果。 任何例外狀況都會轉換成包含例外狀況的失敗驗證結果。

(繼承來源 AuthenticationHandler<TOptions>)
HandleChallengeAsync(AuthenticationProperties)

若該認證方案在請求流程中涉及驗證互動(例如新增回應標頭,或將登入頁面或外部登入地點的 401 結果改為 302),則可覆寫此方法以處理 401 挑戰的疑慮。

HandleForbiddenAsync(AuthenticationProperties)

覆寫此方法以處理 Forbid。

HandleSignInAsync(ClaimsPrincipal, AuthenticationProperties)

覆寫此方法以處理 SignIn。

HandleSignOutAsync(AuthenticationProperties)

覆寫此方法以處理 SignOut。

InitializeAsync(AuthenticationScheme, HttpContext)

初始化處理程式,解析選項並加以驗證。

(繼承來源 AuthenticationHandler<TOptions>)
InitializeEventsAsync()

初始化事件物件,每個請求被 InitializeAsync(AuthenticationScheme, HttpContext)呼叫一次。

(繼承來源 AuthenticationHandler<TOptions>)
InitializeHandlerAsync()

在已初始化選項/事件之後呼叫,處理程式完成初始化本身。

ResolveTarget(String)

解析此驗證作業轉送至的配置。

(繼承來源 AuthenticationHandler<TOptions>)
SignInAsync(ClaimsPrincipal, AuthenticationProperties)

Cookie 型驗證處理程序的實作。

SignInAsync(ClaimsPrincipal, AuthenticationProperties)

處理登入。

(繼承來源 SignInAuthenticationHandler<TOptions>)
SignOutAsync(AuthenticationProperties)

Cookie 型驗證處理程序的實作。

SignOutAsync(AuthenticationProperties)

註銷行為。

(繼承來源 SignOutAuthenticationHandler<TOptions>)

適用於