IdentityServiceCollectionUIExtensions.AddDefaultIdentity 方法

定義

多載

AddDefaultIdentity<TUser>(IServiceCollection)

將一組通用身分識別服務新增至應用程式,包括預設 UI、權杖提供者,以及設定驗證以使用身分識別 Cookie。

AddDefaultIdentity<TUser>(IServiceCollection, Action<IdentityOptions>)

將一組通用身分識別服務新增至應用程式,包括預設 UI、權杖提供者,以及設定驗證以使用身分識別 Cookie。

AddDefaultIdentity<TUser>(IServiceCollection)

將一組通用身分識別服務新增至應用程式,包括預設 UI、權杖提供者,以及設定驗證以使用身分識別 Cookie。

public static Microsoft.AspNetCore.Identity.IdentityBuilder AddDefaultIdentity<TUser> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TUser : class;
static member AddDefaultIdentity : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'User : null)
<Extension()>
Public Function AddDefaultIdentity(Of TUser As Class) (services As IServiceCollection) As IdentityBuilder

類型參數

TUser

參數

傳回

IdentityBuilder

備註

若要使用預設 UI,應用程式必須使用 Microsoft.AspNetCore.MvcMicrosoft.AspNetCore.StaticFiles 且包含 _LoginPartial 應用程式可以找到的部分檢視。

適用於

AddDefaultIdentity<TUser>(IServiceCollection, Action<IdentityOptions>)

將一組通用身分識別服務新增至應用程式,包括預設 UI、權杖提供者,以及設定驗證以使用身分識別 Cookie。

public static Microsoft.AspNetCore.Identity.IdentityBuilder AddDefaultIdentity<TUser> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Identity.IdentityOptions> configureOptions) where TUser : class;
static member AddDefaultIdentity : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Identity.IdentityOptions> -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'User : null)
<Extension()>
Public Function AddDefaultIdentity(Of TUser As Class) (services As IServiceCollection, configureOptions As Action(Of IdentityOptions)) As IdentityBuilder

類型參數

TUser

參數

configureOptions
Action<IdentityOptions>

設定 IdentityOptions

傳回

IdentityBuilder

備註

若要使用預設 UI,應用程式必須使用 Microsoft.AspNetCore.MvcMicrosoft.AspNetCore.StaticFiles 且包含 _LoginPartial 應用程式可以找到的部分檢視。

適用於