IdentityServiceCollectionExtensions.AddIdentity Метод

Определение

Перегрузки

AddIdentity<TUser,TRole>(IServiceCollection)

Добавляет конфигурацию системы удостоверений по умолчанию для указанных типов пользователей и ролей.

AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>)
AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>)

Добавляет и настраивает систему удостоверений для указанных типов пользователей и ролей.

AddIdentity<TUser,TRole>(IServiceCollection)

Добавляет конфигурацию системы удостоверений по умолчанию для указанных типов пользователей и ролей.

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

Параметры типа

TUser

Тип, представляющий пользователя в системе.

TRole

Тип, представляющий роль в системе.

Параметры

services
IServiceCollection

Службы, доступные в приложении.

Возвращаемое значение

Объект IdentityBuilder для создания и настройки системы удостоверений.

Применяется к

AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>)

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

Параметры типа

TUser
TRole

Параметры

setupAction
Action<IdentityOptions>

Возвращаемое значение

Применяется к

AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>)

Добавляет и настраивает систему удостоверений для указанных типов пользователей и ролей.

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

Параметры типа

TUser

Тип, представляющий пользователя в системе.

TRole

Тип, представляющий роль в системе.

Параметры

services
IServiceCollection

Службы, доступные в приложении.

setupAction
Action<IdentityOptions>

Действие для настройки IdentityOptions.

Возвращаемое значение

Объект IdentityBuilder для создания и настройки системы удостоверений.

Применяется к