IAuthenticationService 介面

定義

用來提供驗證。

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)

使用指定的驗證配置驗證要求,並傳回權杖的值。

適用於