IdentityServiceCollectionUIExtensions.AddDefaultIdentity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddDefaultIdentity<TUser>(IServiceCollection) |
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies. |
AddDefaultIdentity<TUser>(IServiceCollection, Action<IdentityOptions>) |
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies. |
AddDefaultIdentity<TUser>(IServiceCollection)
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies.
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
Type Parameters
- TUser
Parameters
- services
- IServiceCollection
The IServiceCollection.
Returns
The IdentityBuilder.
Remarks
In order to use the default UI, the application must be using Microsoft.AspNetCore.Mvc, Microsoft.AspNetCore.StaticFiles and contain a _LoginPartial
partial view that can be found by the application.
Applies to
AddDefaultIdentity<TUser>(IServiceCollection, Action<IdentityOptions>)
Adds a set of common identity services to the application, including a default UI, token providers, and configures authentication to use identity cookies.
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
Type Parameters
- TUser
Parameters
- services
- IServiceCollection
The IServiceCollection.
- configureOptions
- Action<IdentityOptions>
Configures the IdentityOptions.
Returns
The IdentityBuilder.
Remarks
In order to use the default UI, the application must be using Microsoft.AspNetCore.Mvc, Microsoft.AspNetCore.StaticFiles and contain a _LoginPartial
partial view that can be found by the application.