IdentityBuilder Klasa

Definicja

Funkcje pomocnika do konfigurowania usług tożsamości.

public ref class IdentityBuilder
public class IdentityBuilder
type IdentityBuilder = class
Public Class IdentityBuilder
Dziedziczenie
IdentityBuilder

Konstruktory

IdentityBuilder(Type, IServiceCollection)

Tworzy nowe wystąpienie klasy IdentityBuilder.

IdentityBuilder(Type, Type, IServiceCollection)

Tworzy nowe wystąpienie klasy IdentityBuilder.

Właściwości

RoleType

Pobiera element Type używany dla ról.

Services

IServiceCollection Pobiera usługi, do których są dołączone.

UserType

Pobiera dane Type używane dla użytkowników.

Metody

AddClaimsPrincipalFactory<TFactory>()

Dodaje element IUserClaimsPrincipalFactory<TUser> dla elementu UserType.

AddDefaultTokenProviders()

Dodaje domyślnych dostawców tokenów używanych do generowania tokenów na potrzeby resetowania haseł, zmiany poczty e-mail i zmiany operacji numerów telefonów oraz generowania tokenu uwierzytelniania dwuskładnikowego.

AddErrorDescriber<TDescriber>()

Dodaje element IdentityErrorDescriber.

AddPasswordValidator<TValidator>()

Dodaje element IPasswordValidator<TUser> dla elementu UserType.

AddPersonalDataProtection<TProtector,TKeyRing>()

Dodaje element i ILookupProtectorILookupProtectorKeyRing.

AddRoleManager<TRoleManager>()

Dodaje element RoleManager<TRole> dla elementu RoleType.

AddRoles<TRole>()

Dodaje usługi związane z rolami dla elementu TRole, w tym IRoleStore, IRoleValidator i RoleManager.

AddRoleStore<TStore>()

Dodaje element IRoleStore<TRole> dla elementu RoleType.

AddRoleValidator<TRole>()

Dodaje element IRoleValidator<TRole> dla elementu RoleType.

AddSignInManager<TSignInManager>()

Dodaje element SignInManager<TUser> dla elementu .

AddTokenProvider(String, Type)

Dodaje dostawcę tokenu dla elementu UserType.

AddTokenProvider<TProvider>(String)

Dodaje dostawcę tokenu.

AddUserConfirmation<TUserConfirmation>()

Dodaje element IUserConfirmation<TUser> dla elementu .

AddUserManager<TUserManager>()

Dodaje element UserManager<TUser> dla elementu UserType.

AddUserStore<TStore>()

Dodaje element IUserStore<TUser> dla elementu UserType.

AddUserValidator<TValidator>()

Dodaje element IUserValidator<TUser> dla elementu UserType.

Metody rozszerzania

AddApiEndpoints(IdentityBuilder)

Dodaje konfigurację i usługi potrzebne do obsługi MapIdentityApi<TUser>(IEndpointRouteBuilder) , ale nie konfiguruje uwierzytelniania. Wywołaj AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>) uwierzytelnianie i/lub AddIdentityCookies(AuthenticationBuilder) skonfiguruj uwierzytelnianie oddzielnie.

AddDefaultTokenProviders(IdentityBuilder)

Dodaje domyślnych dostawców tokenów używanych do generowania tokenów na potrzeby resetowania haseł, zmiany poczty e-mail i zmiany operacji numerów telefonów oraz generowania tokenu uwierzytelniania dwuskładnikowego.

AddSignInManager(IdentityBuilder)

Dodaje element SignInManager<TUser> dla elementu UserType.

AddSignInManager<TSignInManager>(IdentityBuilder)

Dodaje element SignInManager<TUser> dla elementu UserType.

AddDefaultUI(IdentityBuilder)

Dodaje do aplikacji domyślny, samodzielny interfejs użytkownika tożsamości przy użyciu platformy Razor Pages w obszarze o nazwie Identity.

AddDefaultUI(IdentityBuilder, UIFramework)

Dodaje do aplikacji domyślny, samodzielny interfejs użytkownika tożsamości przy użyciu platformy Razor Pages w obszarze o nazwie Identity.

AddEntityFrameworkStores<TContext>(IdentityBuilder)

Dodaje implementację struktury Entity Framework magazynów informacji o tożsamości.

AddEntityFrameworkStores<TContext,TKey>(IdentityBuilder)

Funkcje pomocnika do konfigurowania usług tożsamości.

Dotyczy