Share via


AuthenticationService 类

定义

public ref class AuthenticationService : Microsoft::AspNetCore::Authentication::IAuthenticationService
public class AuthenticationService : Microsoft.AspNetCore.Authentication.IAuthenticationService
type AuthenticationService = class
    interface IAuthenticationService
Public Class AuthenticationService
Implements IAuthenticationService
继承
AuthenticationService
实现

构造函数

AuthenticationService(IAuthenticationSchemeProvider, IAuthenticationHandlerProvider, IClaimsTransformation)

构造函数。

AuthenticationService(IAuthenticationSchemeProvider, IAuthenticationHandlerProvider, IClaimsTransformation, IOptions<AuthenticationOptions>)

构造函数。

属性

Handlers

用于解析 IAuthenticationHandler 实例。

Options

AuthenticationOptions

Schemes

用于查找 AuthenticationSchemes。

Transform

用于声明转换。

方法

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)

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

适用于