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)

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

適用於