UserManager<TUser> Class
Represents the user manager for users where the primary key for the user is of type string.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.UserManager<TUser, TKey>
Microsoft.AspNet.Identity.UserManager<TUser>
Syntax
public class UserManager<TUser> : UserManager<TUser, string>
where TUser : class, IUser<string>
generic<typename TUser>
where TUser : ref class, IUser<String^>
public ref class UserManager : UserManager<TUser, String^>
type UserManager<'TUser when 'TUser : not struct and IUser<string>> =
class
inherit UserManager<'TUser, string>
end
Public Class UserManager(Of TUser As { Class, IUser(Of String) })
Inherits UserManager(Of TUser, String)
Type Parameters
- TUser
The type of the user.
Constructors
Name | Description | |
---|---|---|
UserManager<TUser>(IUserStore<TUser>) | Initializes a new instance of the UserManager<TUser> class. |
Properties
Name | Description | |
---|---|---|
ClaimsIdentityFactory | Gets or sets the factory used to create claims identities from users.(Inherited from UserManager<TUser, TKey>.) |
|
DefaultAccountLockoutTimeSpan | Gets or sets the default amount of time that a user is locked out for after MaxFailedAccessAttemptsBeforeLockout is reached.(Inherited from UserManager<TUser, TKey>.) |
|
EmailService | Gets or sets the service used to send e-mail.(Inherited from UserManager<TUser, TKey>.) |
|
MaxFailedAccessAttemptsBeforeLockout | Gets or sets the maximum number of access attempts allowed before a user is locked out (if lockout is enabled).(Inherited from UserManager<TUser, TKey>.) |
|
PasswordHasher | Gets or sets the property used to hash/verify passwords.(Inherited from UserManager<TUser, TKey>.) |
|
PasswordValidator | Gets or sets the property used to validate passwords before persisting changes.(Inherited from UserManager<TUser, TKey>.) |
|
SmsService | Gets or sets the property used to send a SMS message.(Inherited from UserManager<TUser, TKey>.) |
|
Store | Gets or sets the persistence abstraction that the UserManager operates against.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsQueryableUsers | Gets a value that indicates whether the store is an IQueryableUserStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserClaim | Gets a value that indicates whether the store is an IUserClaimStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserEmail | Gets a value that indicates whether the store is an IUserEmailStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserLockout | Gets a value that indicates whether the store is an IUserLockoutStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserLogin | Gets a value that indicates whether the store is an IUserLoginStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserPassword | Gets a value that indicates whether the store is an IUserPasswordStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserPhoneNumber | Gets a value that indicates whether the store is an IUserPhoneNumberStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserRole | Gets a value that indicates whether the store is an IUserRoleStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserSecurityStamp | Gets a value that indicates whether the store is an IUserSecurityStore.(Inherited from UserManager<TUser, TKey>.) |
|
SupportsUserTwoFactor | Gets a value that indicates whether the store is an IUserTwoFactorStore.(Inherited from UserManager<TUser, TKey>.) |
|
TwoFactorProviders | Gets the registered two-factor authentication providers for users by their ID.(Inherited from UserManager<TUser, TKey>.) |
|
UserLockoutEnabledByDefault | Gets or sets a value that indicates whether the user lockout is enabled when users are created. (Inherited from UserManager<TUser, TKey>.) |
|
Users | Gets an IQueryable of users if the store is an IQueryableUserStore.(Inherited from UserManager<TUser, TKey>.) |
|
UserTokenProvider | Gets or sets a property used for generating reset password and confirmation tokens.(Inherited from UserManager<TUser, TKey>.) |
|
UserValidator | Gets or sets a property used to validate users before changes are saved.(Inherited from UserManager<TUser, TKey>.) |
Methods
Name | Description | |
---|---|---|
AccessFailedAsync(TKey) | Increments the access failed count for the user and if the failed access account is greater than or equal to the MaxFailedAccessAttempsBeforeLockout, the user will be locked out for the next DefaultAccountLockoutTimeSpan and the AccessFailedCount will be reset to 0. This is used for locking out the user account.(Inherited from UserManager<TUser, TKey>.) |
|
AddClaimAsync(TKey, Claim) | Adds a user claim.(Inherited from UserManager<TUser, TKey>.) |
|
AddLoginAsync(TKey, UserLoginInfo) | Associates a login with a user.(Inherited from UserManager<TUser, TKey>.) |
|
AddPasswordAsync(TKey, String) | Adds a user password only if one does not already exist.(Inherited from UserManager<TUser, TKey>.) |
|
AddToRoleAsync(TKey, String) | Adds a user to a role.(Inherited from UserManager<TUser, TKey>.) |
|
AddToRolesAsync(TKey, String[]) | Method to add user to multiple roles(Inherited from UserManager<TUser, TKey>.) |
|
ChangePasswordAsync(TKey, String, String) | Changes a user password.(Inherited from UserManager<TUser, TKey>.) |
|
ChangePhoneNumberAsync(TKey, String, String) | Sets a user phone number with the verification token.(Inherited from UserManager<TUser, TKey>.) |
|
CheckPasswordAsync(TUser, String) | Determines whether the password is valid for the user.(Inherited from UserManager<TUser, TKey>.) |
|
ConfirmEmailAsync(TKey, String) | Confirms the user e-mail with confirmation token.(Inherited from UserManager<TUser, TKey>.) |
|
CreateAsync(TUser) | Creates a user with no password.(Inherited from UserManager<TUser, TKey>.) |
|
CreateAsync(TUser, String) | Creates a user with the given password.(Inherited from UserManager<TUser, TKey>.) |
|
CreateIdentityAsync(TUser, String) | Creates a ClaimsIdentity representing the user.(Inherited from UserManager<TUser, TKey>.) |
|
DeleteAsync(TUser) | Deletes a user.(Inherited from UserManager<TUser, TKey>.) |
|
Dispose() | Releases the resources used by the current instance of the UserManager<TUser, TKey> class.(Inherited from UserManager<TUser, TKey>.) |
|
Dispose(Boolean) | Releases the resources used by the current instance of the UserManager<TUser, TKey> class.(Inherited from UserManager<TUser, TKey>.) |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
FindAsync(String, String) | Returns a user with the specified username and password or null if there is no match.(Inherited from UserManager<TUser, TKey>.) |
|
FindAsync(UserLoginInfo) | Returns the user associated with this login.(Inherited from UserManager<TUser, TKey>.) |
|
FindByEmailAsync(String) | Finds a user by his e-mail.(Inherited from UserManager<TUser, TKey>.) |
|
FindByIdAsync(TKey) | Finds a user by ID.(Inherited from UserManager<TUser, TKey>.) |
|
FindByNameAsync(String) | Finds a user by user name.(Inherited from UserManager<TUser, TKey>.) |
|
GenerateChangePhoneNumberTokenAsync(TKey, String) | Generates a code that the user can use to change their phone number to a specific number.(Inherited from UserManager<TUser, TKey>.) |
|
GenerateEmailConfirmationTokenAsync(TKey) | Gets the e-mail confirmation token for the user.(Inherited from UserManager<TUser, TKey>.) |
|
GeneratePasswordResetTokenAsync(TKey) | Generates a password reset token for the user using the UserTokenProvider.(Inherited from UserManager<TUser, TKey>.) |
|
GenerateTwoFactorTokenAsync(TKey, String) | Gets a token for a specific two factor provider.(Inherited from UserManager<TUser, TKey>.) |
|
GenerateUserTokenAsync(String, TKey) | Gets a user token for a specific purpose.(Inherited from UserManager<TUser, TKey>.) |
|
GetAccessFailedCountAsync(TKey) | Returns the number of failed access attempts for the user.(Inherited from UserManager<TUser, TKey>.) |
|
GetClaimsAsync(TKey) | Gets a user claims.(Inherited from UserManager<TUser, TKey>.) |
|
GetEmailAsync(TKey) | Gets a user e-mail.(Inherited from UserManager<TUser, TKey>.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetLockoutEnabledAsync(TKey) | Determines whether the lockout is enabled for the user.(Inherited from UserManager<TUser, TKey>.) |
|
GetLockoutEndDateAsync(TKey) | Returns when the user is no longer locked out, dates in the past are considered as not being locked out.(Inherited from UserManager<TUser, TKey>.) |
|
GetLoginsAsync(TKey) | Gets the logins for a user.(Inherited from UserManager<TUser, TKey>.) |
|
GetPhoneNumberAsync(TKey) | Gets a user phone number.(Inherited from UserManager<TUser, TKey>.) |
|
GetRolesAsync(TKey) | Returns the roles for the user.(Inherited from UserManager<TUser, TKey>.) |
|
GetSecurityStampAsync(TKey) | Returns the current security stamp for a user.(Inherited from UserManager<TUser, TKey>.) |
|
GetTwoFactorEnabledAsync(TKey) | Determines whether two factor authentication is enabled for a user.(Inherited from UserManager<TUser, TKey>.) |
|
GetType() | (Inherited from Object.) |
|
GetValidTwoFactorProvidersAsync(TKey) | Returns a list of valid two factor providers for a user.(Inherited from UserManager<TUser, TKey>.) |
|
HasPasswordAsync(TKey) | Determines whether the user has a password.(Inherited from UserManager<TUser, TKey>.) |
|
IsEmailConfirmedAsync(TKey) | Determines whether the user e-mail has been confirmed. (Inherited from UserManager<TUser, TKey>.) |
|
IsInRoleAsync(TKey, String) | Determines whether the user is in the specified role.(Inherited from UserManager<TUser, TKey>.) |
|
IsLockedOutAsync(TKey) | Determines whether the user is locked out.(Inherited from UserManager<TUser, TKey>.) |
|
IsPhoneNumberConfirmedAsync(TKey) | Determines whether the user phone number has been confirmed.(Inherited from UserManager<TUser, TKey>.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
NotifyTwoFactorTokenAsync(TKey, String, String) | Notifies a user with a token using a specific method of two-factor authentication provider.(Inherited from UserManager<TUser, TKey>.) |
|
RegisterTwoFactorProvider(String, IUserTokenProvider<TUser, TKey>) | Registers a two factor authentication provider with the TwoFactorProviders mapping.(Inherited from UserManager<TUser, TKey>.) |
|
RemoveClaimAsync(TKey, Claim) | Removes a user claim.(Inherited from UserManager<TUser, TKey>.) |
|
RemoveFromRoleAsync(TKey, String) | Removes a user from a role.(Inherited from UserManager<TUser, TKey>.) |
|
RemoveFromRolesAsync(TKey, String[]) | Remove user from multiple roles(Inherited from UserManager<TUser, TKey>.) |
|
RemoveLoginAsync(TKey, UserLoginInfo) | Removes a user login.(Inherited from UserManager<TUser, TKey>.) |
|
RemovePasswordAsync(TKey) | Removes a user password.(Inherited from UserManager<TUser, TKey>.) |
|
ResetAccessFailedCountAsync(TKey) | Resets the access failed count for the user to 0.(Inherited from UserManager<TUser, TKey>.) |
|
ResetPasswordAsync(TKey, String, String) | Resets a user password using a reset password token.(Inherited from UserManager<TUser, TKey>.) |
|
SendEmailAsync(TKey, String, String) | Sends an e-mail to the user.(Inherited from UserManager<TUser, TKey>.) |
|
SendSmsAsync(TKey, String) | Sends the user a SMS message.(Inherited from UserManager<TUser, TKey>.) |
|
SetEmailAsync(TKey, String) | Sets a user e-mail.(Inherited from UserManager<TUser, TKey>.) |
|
SetLockoutEnabledAsync(TKey, Boolean) | Sets whether lockout is enabled for this user.(Inherited from UserManager<TUser, TKey>.) |
|
SetLockoutEndDateAsync(TKey, DateTimeOffset) | Sets the time when a user lockout ends.(Inherited from UserManager<TUser, TKey>.) |
|
SetPhoneNumberAsync(TKey, String) | Sets a user phone number.(Inherited from UserManager<TUser, TKey>.) |
|
SetTwoFactorEnabledAsync(TKey, Boolean) | Sets the two factor authentication enabled property for the user.(Inherited from UserManager<TUser, TKey>.) |
|
ToString() | (Inherited from Object.) |
|
UpdateAsync(TUser) | Updates a user.(Inherited from UserManager<TUser, TKey>.) |
|
UpdatePassword(IUserPasswordStore<TUser, TKey>, TUser, String) | (Inherited from UserManager<TUser, TKey>.) |
|
UpdateSecurityStampAsync(TKey) | Generates a new security stamp for a user, used for SignOutEverywhere functionality.(Inherited from UserManager<TUser, TKey>.) |
|
VerifyChangePhoneNumberTokenAsync(TKey, String, String) | Verifies whether the code is valid for a specific user and for a specific phone number.(Inherited from UserManager<TUser, TKey>.) |
|
VerifyPasswordAsync(IUserPasswordStore<TUser, TKey>, TUser, String) | Retrieves the hashed password from the user store and calls PasswordHasher.VerifyHashPassword.(Inherited from UserManager<TUser, TKey>.) |
|
VerifyTwoFactorTokenAsync(TKey, String, String) | Verifies a two factor token with the specified provider.(Inherited from UserManager<TUser, TKey>.) |
|
VerifyUserTokenAsync(TKey, String, String) | Verifies a user token with the specified purpose.(Inherited from UserManager<TUser, TKey>.) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.AspNet.Identity Namespace
ASP.NET Identity
Return to top