UserManager<TUser> Class
Exposes user related api which will automatically save changes to the UserStore
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.UserManager<TUser>
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
'Declaration
Public Class UserManager(Of TUser As IUser) _
Implements IDisposable
'Usage
Dim instance As UserManager(Of TUser)
public class UserManager<TUser> : IDisposable
where TUser : IUser
generic<typename TUser>
where TUser : IUser
public ref class UserManager : IDisposable
type UserManager<'TUser when 'TUser : IUser> =
class
interface IDisposable
end
JScript does not support generic types and methods.
Type Parameters
- TUser
The UserManager<TUser> type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UserManager<TUser> | Constructor |
Top
Properties
Name | Description | |
---|---|---|
ClaimsIdentityFactory | Used to create claims identities from users | |
PasswordHasher | Used to hash/verify passwords | |
PasswordValidator | Used to validate passwords before persisting changes | |
Store | Persistence abstraction that the Manager operates against | |
SupportsUserClaim | Returns true if the store is an IUserClaimStore | |
SupportsUserLogin | Returns true if the store is an IUserLoginStore | |
SupportsUserPassword | Returns true if the store is an IUserPasswordStore | |
SupportsUserRole | Returns true if the store is an IUserRoleStore | |
SupportsUserSecurityStamp | Returns true if the store is an IUserSecurityStore | |
UserValidator | Used to validate users before persisting changes |
Top
Methods
Name | Description | |
---|---|---|
AddClaimAsync | Add a user claim | |
AddLoginAsync | Associate a login with a user | |
AddPasswordAsync | Add a user password only if one does not already exist | |
AddToRoleAsync | Add a user to a role | |
ChangePasswordAsync | Change a user password | |
CreateAsync(TUser) | Create a user with no password | |
CreateAsync(TUser, String) | Create a user and associates it with the given password (if one is provided) | |
CreateIdentityAsync | Creates a ClaimsIdentity representing the user | |
Dispose() | Dispose the store context | |
Dispose(Boolean) | When disposing, actually dipose the store context | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
FindAsync(UserLoginInfo) | Returns the user associated with this login | |
FindAsync(String, String) | Return a user with the specified username and password or null if there is no match. | |
FindByIdAsync | Find a user by id | |
FindByNameAsync | Find a user by name | |
GetClaimsAsync | Get a users's claims | |
GetHashCode | (Inherited from Object.) | |
GetLoginsAsync | Gets the logins for a user. | |
GetRolesAsync | Returns the roles for the user | |
GetType | (Inherited from Object.) | |
HasPasswordAsync | Returns true if the user has a password | |
IsInRoleAsync | Returns true if the user is in the specified role | |
MemberwiseClone | (Inherited from Object.) | |
RemoveClaimAsync | Remove a user claim | |
RemoveFromRoleAsync | Remove a user from a role. | |
RemoveLoginAsync | Remove a user login | |
RemovePasswordAsync | Remove a user's password | |
ToString | (Inherited from Object.) | |
UpdateAsync | Update a user | |
UpdateSecurityStampAsync | Generate a new security stamp for a user, used for SignOutEverywhere functionality |
Top
Extension Methods
Name | Description | |
---|---|---|
AddClaim<TUser> | Add a user claim (Defined by UserManagerExtensions.) | |
AddLogin<TUser> | Sync extension (Defined by UserManagerExtensions.) | |
AddPassword<TUser> | Add a user password only if one does not already exist (Defined by UserManagerExtensions.) | |
AddToRole<TUser> | Add a user to a role (Defined by UserManagerExtensions.) | |
ChangePassword<TUser> | Change a user password (Defined by UserManagerExtensions.) | |
Create<TUser>(TUser) | Overloaded. Create a user with no password (Defined by UserManagerExtensions.) | |
Create<TUser>(TUser, String) | Overloaded. Create a user and associates it with the given password (if one is provided) (Defined by UserManagerExtensions.) | |
CreateIdentity<TUser> | Creates a ClaimsIdentity representing the user (Defined by UserManagerExtensions.) | |
Find<TUser>(UserLoginInfo) | Overloaded. Sync extension (Defined by UserManagerExtensions.) | |
Find<TUser>(String, String) | Overloaded. Return a user with the specified username and password or null if there is no match. (Defined by UserManagerExtensions.) | |
FindById<TUser> | Find a user by id (Defined by UserManagerExtensions.) | |
FindByName<TUser> | Find a user by name (Defined by UserManagerExtensions.) | |
GetClaims<TUser> | Get a users's claims (Defined by UserManagerExtensions.) | |
GetLogins<TUser> | Gets the logins for a user. (Defined by UserManagerExtensions.) | |
GetRoles<TUser> | Get a users's roles (Defined by UserManagerExtensions.) | |
HasPassword<TUser> | Returns true if a user has a password set (Defined by UserManagerExtensions.) | |
IsInRole<TUser> | Returns true if the user is in the specified role (Defined by UserManagerExtensions.) | |
RemoveClaim<TUser> | Remove a user claim (Defined by UserManagerExtensions.) | |
RemoveFromRole<TUser> | Remove a user from a role. (Defined by UserManagerExtensions.) | |
RemoveLogin<TUser> | Remove a user login (Defined by UserManagerExtensions.) | |
RemovePassword<TUser> | Associate a login with a user (Defined by UserManagerExtensions.) | |
Update<TUser> | Update an user (Defined by UserManagerExtensions.) | |
UpdateSecurityStamp<TUser> | Generate a new security stamp for a user, used for SignOutEverywhere functionality (Defined by UserManagerExtensions.) |
Top
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.