IdentityBuilder Class¶
Constructors¶
-
IdentityBuilder
(System.Type, System.Type, IServiceCollection)¶ Creates a new instance of Microsoft.AspNet.Identity.IdentityBuilder.
Arguments: - user (System.Type) – The System.Type to use for the users.
- role (System.Type) – The System.Type to use for the roles.
- services (IServiceCollection) – The IServiceCollection to attach to.
public IdentityBuilder(Type user, Type role, IServiceCollection services)
-
Methods¶
-
AddDefaultTokenProviders
()¶ Adds the default token providers.
Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddDefaultTokenProviders()
-
AddErrorDescriber<TDescriber>
()¶ Adds an Microsoft.AspNet.Identity.IdentityErrorDescriber.
Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddErrorDescriber<TDescriber>()where TDescriber : IdentityErrorDescriber
-
AddPasswordValidator<TValidator>
()¶ Adds an IPasswordValidator<TUser> for the
Microsoft.AspNet.Identity.IdentityBuilder.UserType
.Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddPasswordValidator<TValidator>()where TValidator : class, IPasswordValidator
-
AddRoleManager<TRoleManager>
()¶ Adds a Microsoft.AspNet.Identity.RoleManager`1 for the
Microsoft.AspNet.Identity.IdentityBuilder.RoleType
.Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddRoleManager<TRoleManager>()where TRoleManager : class
-
AddRoleStore<T>
()¶ Adds a Microsoft.AspNet.Identity.IRoleStore`1 for the
Microsoft.AspNet.Identity.IdentityBuilder.RoleType
.Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddRoleStore<T>()where T : class
-
AddRoleValidator<TValidator>
()¶ Adds an IRoleValidator<TRole> for the
Microsoft.AspNet.Identity.IdentityBuilder.RoleType
.Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddRoleValidator<TValidator>()where TValidator : class, IRoleValidator
-
AddTokenProvider<TProvider>
()¶ Adds a token provider.
Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddTokenProvider<TProvider>()where TProvider : class, IUserTokenProvider
-
AddUserManager<TUserManager>
()¶ Adds a Microsoft.AspNet.Identity.UserManager`1 for the
Microsoft.AspNet.Identity.IdentityBuilder.UserType
.Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddUserManager<TUserManager>()where TUserManager : class
-
AddUserStore<T>
()¶ Adds an Microsoft.AspNet.Identity.IUserStore`1 for the
Microsoft.AspNet.Identity.IdentityBuilder.UserType
.Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddUserStore<T>()where T : class
-
AddUserValidator<TValidator>
()¶ Adds an Microsoft.AspNet.Identity.IUserValidator for the
Microsoft.AspNet.Identity.IdentityBuilder.UserType
.Return type: Microsoft.AspNet.Identity.IdentityBuilder Returns: The <see cref=”T:Microsoft.AspNet.Identity.IdentityBuilder” />. public virtual IdentityBuilder AddUserValidator<TValidator>()where TValidator : class, IUserValidator
-
Properties¶
-
RoleType
()¶ Gets the System.Type used for roles.
Return type: System.Type public Type RoleType { get; }
-
Services
()¶ Gets the IServiceCollection services are attached to.
Return type: IServiceCollection public IServiceCollection Services { get; }
-
UserType
()¶ Gets the System.Type used for users.
Return type: System.Type public Type UserType { get; }
-