IdentityBuilder Class

Definition

Helper functions for configuring identity services.

C#
public class IdentityBuilder
Inheritance
IdentityBuilder

Constructors

Properties

RoleType

Gets the Type used for roles.

Services

Gets the IServiceCollection services are attached to.

UserType

Gets the Type used for users.

Methods

Extension Methods

AddApiEndpoints(IdentityBuilder)

Adds configuration and services needed to support MapIdentityApi<TUser>(IEndpointRouteBuilder) but does not configure authentication. Call AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>) and/or AddIdentityCookies(AuthenticationBuilder) to configure authentication separately.

AddDefaultTokenProviders(IdentityBuilder)

Adds the default token providers used to generate tokens for reset passwords, change email and change telephone number operations, and for two factor authentication token generation.

AddSignInManager(IdentityBuilder)

Adds a SignInManager<TUser> for the UserType.

AddSignInManager<TSignInManager>(IdentityBuilder)

Adds a SignInManager<TUser> for the UserType.

AddDefaultUI(IdentityBuilder, UIFramework)

Adds a default, self-contained UI for Identity to the application using Razor Pages in an area named Identity.

AddDefaultUI(IdentityBuilder)

Adds a default, self-contained UI for Identity to the application using Razor Pages in an area named Identity.

AddEntityFrameworkStores<TContext>(IdentityBuilder)

Adds an Entity Framework implementation of identity information stores.

AddEntityFrameworkStores<TContext,TKey>(IdentityBuilder)

Applies to

Proizvod Verzije
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0