Microsoft.AspNetCore.Authentication.Cookies 命名空間
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含支援基於 cookie 的驗證類型。
類別
| 名稱 | Description |
|---|---|
| BaseCookieContext |
包含支援基於 cookie 的驗證類型。 |
| ChunkingCookieManager |
此系統處理的 Cookie 長度限制。 它會拆解長長的回應 cookie,並從請求中重新組合。 |
| CookieAuthenticationDefaults |
與基於 Cookie 的認證處理程序相關的預設值 |
| CookieAuthenticationEvents |
允許訂閱 Cookie 認證期間產生的事件。 |
| CookieAuthenticationHandler |
基於 cookie 的認證處理器實作。 |
| CookieAuthenticationMiddleware |
包含支援基於 cookie 的驗證類型。 |
| CookieAuthenticationOptions | |
| CookieRedirectContext |
當 Challenge、SignIn 或 SignOut 在 Cookie 中介軟體中造成重定向時,會傳遞上下文 |
| CookieSignedInContext |
上下文物件傳入 ICookieAuthenticationEvents 方法 SignedIn。 |
| CookieSigningInContext |
上下文物件傳入 SigningIn(CookieSigningInContext). |
| CookieSigningOutContext | |
| CookieSlidingExpirationContext |
上下文物件傳入 CookieAuthenticationEvents OnCheckSlidingExpiration 方法。 |
| CookieValidatePrincipalContext |
上下文物件傳入 CookieAuthenticationEvents ValidatePrincipal 方法。 |
| PostConfigureCookieAuthenticationOptions |
用來設定所有 CookieAuthenticationOptions的預設值。 |
介面
| 名稱 | Description |
|---|---|
| ICookieAuthenticationEvents |
指定回調方法,讓 CookieAuthenticationMiddleware 開發者能控制認證流程。 /> |
| ICookieManager |
CookieAuthenticationMiddleware 會用此工具處理請求與回應 Cookie。 它從一般的 Cookie API 中抽象出來,以允許像分區(chunking)這類複雜的操作。 |
| ITicketStore |
這提供了一種抽象的儲存機制,可以在伺服器上保留身份資訊,同時只傳送簡單的識別金鑰給用戶端。 這通常用來減輕將大型身份序列化成 Cookie 的問題。 |
備註
欲了解更多關於使用 Cookie 認證的資訊,請參閱「使用 Cookie 驗證而無 ASP.NET Core 身份」。