IAuthenticationService 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
用來提供驗證。
public interface class IAuthenticationService
public interface IAuthenticationService
type IAuthenticationService = interface
Public Interface IAuthenticationService
- 衍生
方法
AuthenticateAsync(HttpContext, String) |
驗證指定的驗證配置。 |
ChallengeAsync(HttpContext, String, AuthenticationProperties) |
挑戰指定的驗證配置。 當未經驗證的使用者要求需要驗證的端點時,可以發出驗證挑戰。 |
ForbidAsync(HttpContext, String, AuthenticationProperties) |
禁止指定的驗證配置。 當已驗證的使用者嘗試存取他們不允許存取的資源時,就會使用 Forbid。 |
SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties) |
為指定的驗證配置登入主體。 |
SignOutAsync(HttpContext, String, AuthenticationProperties) |
登出指定的驗證配置。 |
擴充方法
GetTokenAsync(IAuthenticationService, HttpContext, String) |
使用指定的驗證配置驗證要求,並傳回權杖的值。 |
GetTokenAsync(IAuthenticationService, HttpContext, String, String) |
使用指定的驗證配置驗證要求,並傳回權杖的值。 |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應