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)

禁止指定的身份验证方案。 当经过身份验证的用户尝试访问不允许他们访问的资源时,将使用禁止。

SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties)

将主体登录以执行指定的身份验证方案。

SignOutAsync(HttpContext, String, AuthenticationProperties)

注销指定的身份验证方案。

扩展方法

GetTokenAsync(IAuthenticationService, HttpContext, String)

使用指定的身份验证方案对请求进行身份验证,并返回令牌的值。

GetTokenAsync(IAuthenticationService, HttpContext, String, String)

使用指定的身份验证方案对请求进行身份验证,并返回令牌的值。

适用于