Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

UserManager<TUser> Class

Exposes user related api which will automatically save changes to the UserStore

System.Object
  Microsoft.AspNet.Identity.UserManager<TUser>

Namespace:  Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

public class UserManager<TUser> : IDisposable 
where TUser : IUser

Type Parameters

TUser

The UserManager<TUser> type exposes the following members.

  NameDescription
Public methodUserManager<TUser>Constructor
Top

  NameDescription
Public propertyClaimsIdentityFactoryUsed to create claims identities from users
Public propertyPasswordHasherUsed to hash/verify passwords
Public propertyPasswordValidatorUsed to validate passwords before persisting changes
Protected propertyStorePersistence abstraction that the Manager operates against
Public propertySupportsUserClaimReturns true if the store is an IUserClaimStore
Public propertySupportsUserLoginReturns true if the store is an IUserLoginStore
Public propertySupportsUserPasswordReturns true if the store is an IUserPasswordStore
Public propertySupportsUserRoleReturns true if the store is an IUserRoleStore
Public propertySupportsUserSecurityStampReturns true if the store is an IUserSecurityStore
Public propertyUserValidatorUsed to validate users before persisting changes
Top

  NameDescription
Public methodAddClaimAsyncAdd a user claim
Public methodAddLoginAsyncAssociate a login with a user
Public methodAddPasswordAsyncAdd a user password only if one does not already exist
Public methodAddToRoleAsyncAdd a user to a role
Public methodChangePasswordAsyncChange a user password
Public methodCreateAsync(TUser)Create a user with no password
Public methodCreateAsync(TUser, String)Create a user and associates it with the given password (if one is provided)
Public methodCreateIdentityAsyncCreates a ClaimsIdentity representing the user
Public methodDispose()Dispose the store context
Protected methodDispose(Boolean)When disposing, actually dipose the store context
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFindAsync(UserLoginInfo)Returns the user associated with this login
Public methodFindAsync(String, String)Return a user with the specified username and password or null if there is no match.
Public methodFindByIdAsyncFind a user by id
Public methodFindByNameAsyncFind a user by name
Public methodGetClaimsAsyncGet a users's claims
Public methodGetHashCode (Inherited from Object.)
Public methodGetLoginsAsyncGets the logins for a user.
Public methodGetRolesAsyncReturns the roles for the user
Public methodGetType (Inherited from Object.)
Public methodHasPasswordAsyncReturns true if the user has a password
Public methodIsInRoleAsyncReturns true if the user is in the specified role
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRemoveClaimAsyncRemove a user claim
Public methodRemoveFromRoleAsyncRemove a user from a role.
Public methodRemoveLoginAsyncRemove a user login
Public methodRemovePasswordAsyncRemove a user's password
Public methodToString (Inherited from Object.)
Public methodUpdateAsyncUpdate a user
Public methodUpdateSecurityStampAsyncGenerate a new security stamp for a user, used for SignOutEverywhere functionality
Top

  NameDescription
Public Extension MethodAddClaim<TUser>Add a user claim (Defined by UserManagerExtensions.)
Public Extension MethodAddLogin<TUser>Sync extension (Defined by UserManagerExtensions.)
Public Extension MethodAddPassword<TUser>Add a user password only if one does not already exist (Defined by UserManagerExtensions.)
Public Extension MethodAddToRole<TUser>Add a user to a role (Defined by UserManagerExtensions.)
Public Extension MethodChangePassword<TUser>Change a user password (Defined by UserManagerExtensions.)
Public Extension MethodCreate<TUser>(TUser)Overloaded. Create a user with no password (Defined by UserManagerExtensions.)
Public Extension MethodCreate<TUser>(TUser, String)Overloaded. Create a user and associates it with the given password (if one is provided) (Defined by UserManagerExtensions.)
Public Extension MethodCreateIdentity<TUser>Creates a ClaimsIdentity representing the user (Defined by UserManagerExtensions.)
Public Extension MethodFind<TUser>(UserLoginInfo)Overloaded. Sync extension (Defined by UserManagerExtensions.)
Public Extension MethodFind<TUser>(String, String)Overloaded. Return a user with the specified username and password or null if there is no match. (Defined by UserManagerExtensions.)
Public Extension MethodFindById<TUser>Find a user by id (Defined by UserManagerExtensions.)
Public Extension MethodFindByName<TUser>Find a user by name (Defined by UserManagerExtensions.)
Public Extension MethodGetClaims<TUser>Get a users's claims (Defined by UserManagerExtensions.)
Public Extension MethodGetLogins<TUser>Gets the logins for a user. (Defined by UserManagerExtensions.)
Public Extension MethodGetRoles<TUser>Get a users's roles (Defined by UserManagerExtensions.)
Public Extension MethodHasPassword<TUser>Returns true if a user has a password set (Defined by UserManagerExtensions.)
Public Extension MethodIsInRole<TUser>Returns true if the user is in the specified role (Defined by UserManagerExtensions.)
Public Extension MethodRemoveClaim<TUser>Remove a user claim (Defined by UserManagerExtensions.)
Public Extension MethodRemoveFromRole<TUser>Remove a user from a role. (Defined by UserManagerExtensions.)
Public Extension MethodRemoveLogin<TUser>Remove a user login (Defined by UserManagerExtensions.)
Public Extension MethodRemovePassword<TUser>Associate a login with a user (Defined by UserManagerExtensions.)
Public Extension MethodUpdate<TUser>Update an user (Defined by UserManagerExtensions.)
Public Extension MethodUpdateSecurityStamp<TUser>Generate a new security stamp for a user, used for SignOutEverywhere functionality (Defined by UserManagerExtensions.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft