語言

AuthenticationBuilder 類別

定義

用於設定認證

public ref class AuthenticationBuilder
public class AuthenticationBuilder
type AuthenticationBuilder = class
Public Class AuthenticationBuilder
繼承
AuthenticationBuilder

建構函式

名稱 Description
AuthenticationBuilder(IServiceCollection)

初始化一個新的 實 AuthenticationBuilder例。

屬性

名稱 Description
Services

服務正在設定中。

方法

名稱 Description
AddPolicyScheme(String, String, Action<PolicySchemeOptions>)

新增一個 PolicySchemeHandler 基於認證的處理器,可用來重新導向其他認證方案。

AddRemoteScheme<TOptions,THandler>(String, String, Action<TOptions>)

新增 RemoteAuthenticationHandler<TOptions> 一個支援遠端驗證的基底 AuthenticationScheme ,可由 IAuthenticationService使用 。

AddScheme<TOptions,THandler>(String, Action<TOptions>)

加入 a AuthenticationScheme ,可被 IAuthenticationService使用 。

AddScheme<TOptions,THandler>(String, String, Action<TOptions>)

加入 a AuthenticationScheme ,可被 IAuthenticationService使用 。

擴充方法

名稱 Description
AddApplicationCookie(AuthenticationBuilder)

新增身份應用 Cookie。

AddAzureAD(AuthenticationBuilder, Action<AzureADOptions>)
已淘汰.

為你的應用程式新增 Azure Active Directory 認證功能。

AddAzureAD(AuthenticationBuilder, String, String, String, String, Action<AzureADOptions>)
已淘汰.

為你的應用程式新增 Azure Active Directory 認證功能。

AddAzureADB2C(AuthenticationBuilder, Action<AzureADB2COptions>)
已淘汰.

為你的應用程式新增 Azure Active Directory B2C 認證功能。

AddAzureADB2C(AuthenticationBuilder, String, String, String, String, Action<AzureADB2COptions>)
已淘汰.

為你的應用程式新增 Azure Active Directory B2C 認證功能。

AddAzureADB2CBearer(AuthenticationBuilder, Action<AzureADB2COptions>)
已淘汰.

為你的應用程式新增 Azure AD B2C 應用程式的 JWT 承載認證功能。

AddAzureADB2CBearer(AuthenticationBuilder, String, String, Action<AzureADB2COptions>)
已淘汰.

為你的應用程式新增 Azure AD B2C 應用程式的 JWT 承載認證功能。

AddAzureADBearer(AuthenticationBuilder, Action<AzureADOptions>)
已淘汰.

為你的應用程式加入 Azure Active Directory 應用程式的 JWT 承載認證功能。

AddAzureADBearer(AuthenticationBuilder, String, String, Action<AzureADOptions>)
已淘汰.

為你的應用程式加入 Azure Active Directory 應用程式的 JWT 承載認證功能。

AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>)

新增持有人令牌認證功能。 預設格式由 AuthenticationScheme指定。

持有人標記可透過呼叫 SignInAsync(HttpContext, String, ClaimsPrincipal)取得。

AddBearerToken(AuthenticationBuilder, String, Action<BearerTokenOptions>)

新增持有人令牌認證功能。

持有人標記可透過呼叫 SignInAsync(HttpContext, String, ClaimsPrincipal)取得。

AddBearerToken(AuthenticationBuilder, String)

新增持有人令牌認證功能。

持有人標記可透過呼叫 SignInAsync(HttpContext, String, ClaimsPrincipal)取得。

AddBearerToken(AuthenticationBuilder)

新增持有人令牌認證功能。 預設格式由 AuthenticationScheme指定。

持有人標記可透過呼叫 SignInAsync(HttpContext, String, ClaimsPrincipal)取得。

AddCertificate(AuthenticationBuilder, Action<CertificateAuthenticationOptions>)

新增憑證驗證功能。

憑證認證使用認證處理器來驗證客戶端憑證並觸發事件,將憑證解析為 ClaimsPrincipal。 請參閱 https://tools.ietf.org/html/rfc5246#section-7.4.4 更多關於憑證驗證的相關資訊。

AddCertificate(AuthenticationBuilder, String, Action<CertificateAuthenticationOptions>)

新增憑證驗證功能。

憑證認證使用認證處理器來驗證客戶端憑證並觸發事件,將憑證解析為 ClaimsPrincipal。 請參閱 https://tools.ietf.org/html/rfc5246#section-7.4.4 更多關於憑證驗證的相關資訊。

AddCertificate(AuthenticationBuilder, String)

新增憑證驗證功能。

憑證認證使用認證處理器來驗證客戶端憑證並觸發事件,將憑證解析為 ClaimsPrincipal。 請參閱 https://tools.ietf.org/html/rfc5246#section-7.4.4 更多關於憑證驗證的相關資訊。

AddCertificate(AuthenticationBuilder)

新增憑證驗證功能。

憑證認證使用認證處理器來驗證客戶端憑證並觸發事件,將憑證解析為 ClaimsPrincipal。 請參閱 https://tools.ietf.org/html/rfc5246#section-7.4.4 更多關於憑證驗證的相關資訊。

AddCertificateCache(AuthenticationBuilder, Action<CertificateValidationCacheOptions>)

新增憑證驗證功能。

憑證認證使用認證處理器來驗證客戶端憑證並觸發事件,將憑證解析為 ClaimsPrincipal。 請參閱 https://tools.ietf.org/html/rfc5246#section-7.4.4 更多關於憑證驗證的相關資訊。

AddCookie(AuthenticationBuilder, Action<CookieAuthenticationOptions>)

在使用預設方案時加入了 Cookie 認證 AuthenticationBuilder 功能。 預設格式由 AuthenticationScheme指定。

Cookie 認證使用客戶端中持久化的 HTTP Cookie 來執行認證。

AddCookie(AuthenticationBuilder, String, Action<CookieAuthenticationOptions>)

在使用指定方案時加入 Cookie 認證 AuthenticationBuilder 功能。

Cookie 認證使用客戶端中持久化的 HTTP Cookie 來執行認證。

AddCookie(AuthenticationBuilder, String, String, Action<CookieAuthenticationOptions>)

在使用指定方案時加入 Cookie 認證 AuthenticationBuilder 功能。

Cookie 認證使用客戶端中持久化的 HTTP Cookie 來執行認證。

AddCookie(AuthenticationBuilder, String)

在使用指定方案時加入 Cookie 認證 AuthenticationBuilder 功能。

Cookie 認證使用客戶端中持久化的 HTTP Cookie 來執行認證。

AddCookie(AuthenticationBuilder)

在使用預設方案時加入了 Cookie 認證 AuthenticationBuilder 功能。 預設格式由 AuthenticationScheme指定。

Cookie 認證使用客戶端中持久化的 HTTP Cookie 來執行認證。

AddExternalCookie(AuthenticationBuilder)

新增用於外部登入的身份 Cookie。

AddFacebook(AuthenticationBuilder, Action<FacebookOptions>)

新增了基於 Facebook OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Facebook 認證允許應用程式使用者使用他們的 Facebook 帳號登入。

AddFacebook(AuthenticationBuilder, String, Action<FacebookOptions>)

新增了基於 Facebook OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Facebook 認證允許應用程式使用者使用他們的 Facebook 帳號登入。

AddFacebook(AuthenticationBuilder, String, String, Action<FacebookOptions>)

新增了基於 Facebook OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Facebook 認證允許應用程式使用者使用他們的 Facebook 帳號登入。

AddFacebook(AuthenticationBuilder)

新增了基於 Facebook OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Facebook 認證允許應用程式使用者使用他們的 Facebook 帳號登入。

AddGoogle(AuthenticationBuilder, Action<GoogleOptions>)

新增了基於 Google OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Google 認證允許應用程式使用者使用他們的 Google 帳號登入。

AddGoogle(AuthenticationBuilder, String, Action<GoogleOptions>)

新增了基於 Google OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Google 認證允許應用程式使用者使用他們的 Google 帳號登入。

AddGoogle(AuthenticationBuilder, String, String, Action<GoogleOptions>)

新增了基於 Google OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Google 認證允許應用程式使用者使用他們的 Google 帳號登入。

AddGoogle(AuthenticationBuilder)

新增了基於 Google OAuth 的認證,並使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

Google 認證允許應用程式使用者使用他們的 Google 帳號登入。

AddIdentityCookies(AuthenticationBuilder, Action<IdentityCookiesBuilder>)

新增登入管理器所需的 cookie 認證功能。

AddIdentityCookies(AuthenticationBuilder)

新增了 Cookie 認證功能。

AddIdentityServerJwt(AuthenticationBuilder)

新增一個與授權伺服器共存的 API 認證處理器。

AddJwtBearer(AuthenticationBuilder, Action<JwtBearerOptions>)

啟用 JWT 承載者,使用預設方案 AuthenticationScheme。

JWT 承載認證透過從請求標頭中擷取並驗證 JWT 標記 Authorization 來進行認證。

AddJwtBearer(AuthenticationBuilder, String, Action<JwtBearerOptions>)

啟用使用指定方案的 JWT 承載身份驗證。

JWT 承載認證透過從請求標頭中擷取並驗證 JWT 標記 Authorization 來進行認證。

AddJwtBearer(AuthenticationBuilder, String, String, Action<JwtBearerOptions>)

啟用使用指定方案的 JWT 承載身份驗證。

JWT 承載認證透過從請求標頭中擷取並驗證 JWT 標記 Authorization 來進行認證。

AddJwtBearer(AuthenticationBuilder, String)

啟用 JWT 承載者驗證,使用預設方案。

JWT 承載認證透過從請求標頭中擷取並驗證 JWT 標記 Authorization 來進行認證。

AddJwtBearer(AuthenticationBuilder)

啟用 JWT 承載者,使用預設方案 AuthenticationScheme。

JWT 承載認證透過從請求標頭中擷取並驗證 JWT 標記 Authorization 來進行認證。

AddMicrosoftAccount(AuthenticationBuilder, Action<MicrosoftAccountOptions>)

新增了基於 Microsoft 帳戶 OAuth 的認證,並使用AuthenticationBuilder預設方案。 預設格式由 AuthenticationScheme指定。

Microsoft Account 認證允許應用程式使用者以工作、學校或個人 Microsoft 帳戶 登入。

AddMicrosoftAccount(AuthenticationBuilder, String, Action<MicrosoftAccountOptions>)

新增了基於 Microsoft 帳戶 OAuth 的認證,並使用AuthenticationBuilder預設方案。 預設格式由 AuthenticationScheme指定。

Microsoft Account 認證允許應用程式使用者以工作、學校或個人 Microsoft 帳戶 登入。

AddMicrosoftAccount(AuthenticationBuilder, String, String, Action<MicrosoftAccountOptions>)

新增了基於 Microsoft 帳戶 OAuth 的認證,並使用AuthenticationBuilder預設方案。 預設格式由 AuthenticationScheme指定。

Microsoft Account 認證允許應用程式使用者以工作、學校或個人 Microsoft 帳戶 登入。

AddMicrosoftAccount(AuthenticationBuilder)

新增了基於 Microsoft 帳戶 OAuth 的認證,並使用AuthenticationBuilder預設方案。 預設格式由 AuthenticationScheme指定。

Microsoft Account 認證允許應用程式使用者以工作、學校或個人 Microsoft 帳戶 登入。

AddNegotiate(AuthenticationBuilder, Action<NegotiateOptions>)

設定 使用 AuthenticationBuilder Negotiate(亦稱為 Windows、Kerberos 或 NTLM)的預設格式驗證。 預設格式由 AuthenticationScheme指定。

此認證處理器支援 Windows 與 Linux 伺服器上的 Kerberos。

AddNegotiate(AuthenticationBuilder, String, Action<NegotiateOptions>)

AuthenticationBuilder配置為使用 Negotiate(亦稱為 Windows、Kerberos 或 NTLM)認證,並依指定認證方案進行驗證。

此認證處理器支援 Windows 與 Linux 伺服器上的 Kerberos。

AddNegotiate(AuthenticationBuilder, String, String, Action<NegotiateOptions>)

AuthenticationBuilder配置為使用 Negotiate(亦稱為 Windows、Kerberos 或 NTLM)認證,並依指定認證方案進行驗證。

此認證處理器支援 Windows 與 Linux 伺服器上的 Kerberos。

AddNegotiate(AuthenticationBuilder)

配置 為AuthenticationBuilder使用 Negotiate(亦稱為 Windows、Kerberos 或 NTLM)的認證,使用預設方案。AuthenticationScheme

此認證處理器支援 Windows 與 Linux 伺服器上的 Kerberos。

AddOAuth(AuthenticationBuilder, String, Action<OAuthOptions>)

新增基於 OAuth 2.0 的認證機制,並使用 AuthenticationBuilder 指定的認證方案。

AddOAuth(AuthenticationBuilder, String, String, Action<OAuthOptions>)

新增基於 OAuth 2.0 的認證機制,並使用 AuthenticationBuilder 指定的認證方案。

AddOAuth<TOptions,THandler>(AuthenticationBuilder, String, Action<TOptions>)

新增基於 OAuth 2.0 的認證機制,並使用 AuthenticationBuilder 指定的認證方案。

AddOAuth<TOptions,THandler>(AuthenticationBuilder, String, String, Action<TOptions>)

新增基於 OAuth 2.0 的認證機制,並使用 AuthenticationBuilder 指定的認證方案。

AddOpenIdConnect(AuthenticationBuilder, Action<OpenIdConnectOptions>)

新增 OpenId Connect 認證,使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

OpenID Connect 是建立在 OAuth 2.0 協定之上的身份層。 它允許用戶端請求並接收有關已認證會話及終端使用者的資訊。

AddOpenIdConnect(AuthenticationBuilder, String, Action<OpenIdConnectOptions>)

新增 OpenId Connect 認證功能,並使用 AuthenticationBuilder 指定的方案。

OpenID Connect 是建立在 OAuth 2.0 協定之上的身份層。 它允許用戶端請求並接收有關已認證會話及終端使用者的資訊。

AddOpenIdConnect(AuthenticationBuilder, String, String, Action<OpenIdConnectOptions>)

新增 OpenId Connect 認證功能,並使用 AuthenticationBuilder 指定的方案。

OpenID Connect 是建立在 OAuth 2.0 協定之上的身份層。 它允許用戶端請求並接收有關已認證會話及終端使用者的資訊。

AddOpenIdConnect(AuthenticationBuilder)

新增 OpenId Connect 認證,使用 AuthenticationBuilder 預設方案。 預設格式由 AuthenticationScheme指定。

OpenID Connect 是建立在 OAuth 2.0 協定之上的身份層。 它允許用戶端請求並接收有關已認證會話及終端使用者的資訊。

AddTwitter(AuthenticationBuilder, Action<TwitterOptions>)

在預設方案中加入了基於 Twitter OAuth 的認證 AuthenticationBuilder 。 預設格式由 AuthenticationScheme指定。

Twitter 認證允許應用程式使用者使用他們的 Twitter 帳號登入。

AddTwitter(AuthenticationBuilder, String, Action<TwitterOptions>)

在預設方案中加入了基於 Twitter OAuth 的認證 AuthenticationBuilder 。 預設格式由 AuthenticationScheme指定。

Twitter 認證允許應用程式使用者使用他們的 Twitter 帳號登入。

AddTwitter(AuthenticationBuilder, String, String, Action<TwitterOptions>)

在預設方案中加入了基於 Twitter OAuth 的認證 AuthenticationBuilder 。 預設格式由 AuthenticationScheme指定。

Twitter 認證允許應用程式使用者使用他們的 Twitter 帳號登入。

AddTwitter(AuthenticationBuilder)

在預設方案中加入了基於 Twitter OAuth 的認證 AuthenticationBuilder 。 預設格式由 AuthenticationScheme指定。

Twitter 認證允許應用程式使用者使用他們的 Twitter 帳號登入。

AddTwoFactorRememberMeCookie(AuthenticationBuilder)

新增用於雙重因素的身份 Cookie 記憶。

AddTwoFactorUserIdCookie(AuthenticationBuilder)

新增用於雙重登入的身份 Cookie。

AddWsFederation(AuthenticationBuilder, Action<WsFederationOptions>)

使用預設的認證方案、顯示名稱及指定選項配置註冊 。WsFederationHandler

AddWsFederation(AuthenticationBuilder, String, Action<WsFederationOptions>)

使用指定的認證方案、預設顯示名稱及選項配置註冊。WsFederationHandler

AddWsFederation(AuthenticationBuilder, String, String, Action<WsFederationOptions>)

使用指定的認證方案、顯示名稱及選項設定來註冊。WsFederationHandler

AddWsFederation(AuthenticationBuilder)

使用預設的認證方案、顯示名稱和選項來註冊。WsFederationHandler

適用於