IdentityServiceCollectionUIExtensions.AddDefaultIdentity 方法

定义

重载

AddDefaultIdentity<TUser>(IServiceCollection)

向应用程序添加一组常见的标识服务,包括默认 UI、令牌提供程序,并将身份验证配置为使用标识 Cookie。

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

向应用程序添加一组常见的标识服务,包括默认 UI、令牌提供程序,并将身份验证配置为使用标识 Cookie。

AddDefaultIdentity<TUser>(IServiceCollection)

Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs

向应用程序添加一组常见的标识服务,包括默认 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>)

Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs
Source:
IdentityServiceCollectionUIExtensions.cs

向应用程序添加一组常见的标识服务,包括默认 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 应用程序可以找到的部分视图。

适用于