Class MemberIdentityBuilder
Provides methods to construct member identity objects used in authentication and authorization processes within Umbraco.
Inheritance
Namespace: Umbraco.Cms.Core.Security
Assembly: Umbraco.Infrastructure.dll
Syntax
public class MemberIdentityBuilder : IdentityBuilder
Constructors
View SourceMemberIdentityBuilder(IServiceCollection)
Initializes a new instance of the MemberIdentityBuilder class.
Declaration
public MemberIdentityBuilder(IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services |
MemberIdentityBuilder(Type, IServiceCollection)
Initializes a new instance of the MemberIdentityBuilder class.
Declaration
public MemberIdentityBuilder(Type role, IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | role | |
| IServiceCollection | services |
Methods
View SourceAddErrorDescriber<TDescriber>()
Registers a custom error describer of type TDescriber with the identity builder.
The specified type must inherit from MembersErrorDescriber.
If TDescriber does not inherit from MembersErrorDescriber, an System.InvalidOperationException is thrown.
Declaration
public override IdentityBuilder AddErrorDescriber<TDescriber>() where TDescriber : IdentityErrorDescriber
Returns
| Type | Description |
|---|---|
| IdentityBuilder | The current Microsoft.AspNetCore.Identity.IdentityBuilder instance for method chaining. |
Type Parameters
| Name | Description |
|---|---|
| TDescriber | The type of the custom error describer to add. |
Remarks
override to add itself, by default identity only wants a single IdentityErrorDescriber
AddTokenProvider(string, Type)
Adds a token provider for the MemberIdentityBuilder.
Declaration
public override IdentityBuilder AddTokenProvider(string providerName, Type provider)
Parameters
| Type | Name | Description |
|---|---|---|
| string | providerName | The name of the provider to add. |
| Type | provider | The type of the Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider<TUser> to add. |
Returns
| Type | Description |
|---|---|
| IdentityBuilder | The current Microsoft.AspNetCore.Identity.IdentityBuilder instance. |