IdentityServiceCollectionExtensions.AddIdentity IdentityServiceCollectionExtensions.AddIdentity IdentityServiceCollectionExtensions.AddIdentity IdentityServiceCollectionExtensions.AddIdentity Method

Definition

Overloads

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

Adds the default identity system configuration for the specified User and Role types.

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

Adds and configures the identity system for the specified User and Role types.

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

Adds and configures the identity system for the specified User and Role types.

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

Adds the default identity system configuration for the specified User and Role types.

public:
generic <typename TUser, typename TRole>
 where TUser : class where TRole : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Identity::IdentityBuilder ^ AddIdentity(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
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

Type Parameters

TUser

The type representing a User in the system.

TRole

The type representing a Role in the system.

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The services available in the application.

Returns

An IdentityBuilder for creating and configuring the identity system.

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

Adds and configures the identity system for the specified User and Role types.

public:
generic <typename TUser, typename TRole>
 where TUser : class where TRole : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Identity::IdentityBuilder ^ AddIdentity(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::Builder::IdentityOptions ^> ^ setupAction);
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

Type Parameters

TUser

The type representing a User in the system.

TRole

The type representing a Role in the system.

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The services available in the application.

setupAction
Action<IdentityOptions>

An action to configure the IdentityOptions.

Returns

An IdentityBuilder for creating and configuring the identity system.

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

Adds and configures the identity system for the specified User and Role types.

public:
generic <typename TUser, typename TRole>
 where TUser : class where TRole : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Identity::IdentityBuilder ^ AddIdentity(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::Identity::IdentityOptions ^> ^ setupAction);
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

Type Parameters

TUser

The type representing a User in the system.

TRole

The type representing a Role in the system.

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The services available in the application.

setupAction
Action<IdentityOptions>

An action to configure the IdentityOptions.

Returns

An IdentityBuilder for creating and configuring the identity system.

Applies to