View Source
Class BackOfficeUserStore
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public class BackOfficeUserStore : DisposableObjectSlim, IUserSessionStore<BackOfficeIdentityUser, int>, IDisposable
Constructors
View Source
BackOfficeUserStore(IUserService, IMemberTypeService, IEntityService, IExternalLoginService, IGlobalSettings, MembershipProviderBase, UmbracoMapper)
Declaration
[Obsolete("Use the constructor specifying all dependencies")]
public BackOfficeUserStore(IUserService userService, IMemberTypeService memberTypeService, IEntityService entityService, IExternalLoginService externalLoginService, IGlobalSettings globalSettings, MembershipProviderBase usersMembershipProvider, UmbracoMapper mapper)
Parameters
View Source
BackOfficeUserStore(IUserService, IMemberTypeService, IEntityService, IExternalLoginService, IGlobalSettings, MembershipProviderBase, UmbracoMapper, AppCaches)
Declaration
public BackOfficeUserStore(IUserService userService, IMemberTypeService memberTypeService, IEntityService entityService, IExternalLoginService externalLoginService, IGlobalSettings globalSettings, MembershipProviderBase usersMembershipProvider, UmbracoMapper mapper, AppCaches appCaches)
Parameters
Methods
View Source
AddLoginAsync(BackOfficeIdentityUser, UserLoginInfo)
Adds a user login with the specified provider and key
Declaration
public Task AddLoginAsync(BackOfficeIdentityUser user, UserLoginInfo login)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
AddToRoleAsync(BackOfficeIdentityUser, String)
Adds a user to a role (user group)
Declaration
public Task AddToRoleAsync(BackOfficeIdentityUser user, string roleName)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
CreateAsync(BackOfficeIdentityUser)
Declaration
public Task CreateAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
DeleteAsync(BackOfficeIdentityUser)
Declaration
public Task DeleteAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
DisposeResources()
Handles the disposal of resources. Derived from abstract class DisposableObjectSlim which handles common required locking logic.
Declaration
protected override void DisposeResources()
View Source
FindAsync(UserLoginInfo)
Returns the user associated with this login
Declaration
public Task<BackOfficeIdentityUser> FindAsync(UserLoginInfo login)
Parameters
Type |
Name |
Description |
UserLoginInfo |
login |
|
Returns
View Source
FindByEmailAsync(String)
Returns the user associated with this email
Declaration
public Task<BackOfficeIdentityUser> FindByEmailAsync(string email)
Parameters
Type |
Name |
Description |
System.String |
email |
|
Returns
View Source
FindByIdAsync(Int32)
Declaration
public async Task<BackOfficeIdentityUser> FindByIdAsync(int userId)
Parameters
Type |
Name |
Description |
System.Int32 |
userId |
|
Returns
View Source
FindByNameAsync(String)
Declaration
public async Task<BackOfficeIdentityUser> FindByNameAsync(string userName)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
Returns
View Source
GetAccessFailedCountAsync(BackOfficeIdentityUser)
Returns the current number of failed access attempts. This number usually will be reset whenever the password is
verified or the account is locked out.
Declaration
public Task<int> GetAccessFailedCountAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
View Source
GetEmailAsync(BackOfficeIdentityUser)
Declaration
public Task<string> GetEmailAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
View Source
GetEmailConfirmedAsync(BackOfficeIdentityUser)
Returns true if the user email is confirmed
Declaration
public Task<bool> GetEmailConfirmedAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
View Source
GetLockoutEnabledAsync(BackOfficeIdentityUser)
Declaration
public Task<bool> GetLockoutEnabledAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
View Source
GetLockoutEndDateAsync(BackOfficeIdentityUser)
Returns the DateTimeOffset that represents the end of a user's lockout, any time in the past should be considered not locked out.
Declaration
public Task<DateTimeOffset> GetLockoutEndDateAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.DateTimeOffset> |
|
View Source
GetLoginsAsync(BackOfficeIdentityUser)
Returns the linked accounts for this user
Declaration
public Task<IList<UserLoginInfo>> GetLoginsAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IList<UserLoginInfo>> |
|
View Source
GetPasswordHashAsync(BackOfficeIdentityUser)
Get the user password hash
Declaration
public Task<string> GetPasswordHashAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
View Source
GetRolesAsync(BackOfficeIdentityUser)
Returns the roles (user groups) for this user
Declaration
public Task<IList<string>> GetRolesAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IList<System.String>> |
|
View Source
GetSecurityStampAsync(BackOfficeIdentityUser)
Get the user security stamp
Declaration
public Task<string> GetSecurityStampAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
View Source
GetTwoFactorEnabledAsync(BackOfficeIdentityUser)
Returns whether two factor authentication is enabled for the user
Declaration
public virtual Task<bool> GetTwoFactorEnabledAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
View Source
HasPasswordAsync(BackOfficeIdentityUser)
Returns true if a user has a password set
Declaration
public Task<bool> HasPasswordAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
View Source
IncrementAccessFailedCountAsync(BackOfficeIdentityUser)
Used to record when an attempt to access the user has failed
Declaration
public Task<int> IncrementAccessFailedCountAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
View Source
IsInRoleAsync(BackOfficeIdentityUser, String)
Returns true if a user is in the role
Declaration
public Task<bool> IsInRoleAsync(BackOfficeIdentityUser user, string roleName)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
View Source
RemoveFromRoleAsync(BackOfficeIdentityUser, String)
Removes the role (user group) for the user
Declaration
public Task RemoveFromRoleAsync(BackOfficeIdentityUser user, string roleName)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
RemoveLoginAsync(BackOfficeIdentityUser, UserLoginInfo)
Removes the user login with the specified combination if it exists
Declaration
public Task RemoveLoginAsync(BackOfficeIdentityUser user, UserLoginInfo login)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
ResetAccessFailedCountAsync(BackOfficeIdentityUser)
Used to reset the access failed count, typically after the account is successfully accessed
Declaration
public Task ResetAccessFailedCountAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
SetEmailAsync(BackOfficeIdentityUser, String)
Declaration
public Task SetEmailAsync(BackOfficeIdentityUser user, string email)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
SetEmailConfirmedAsync(BackOfficeIdentityUser, Boolean)
Sets whether the user email is confirmed
Declaration
public Task SetEmailConfirmedAsync(BackOfficeIdentityUser user, bool confirmed)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
SetLockoutEnabledAsync(BackOfficeIdentityUser, Boolean)
Doesn't actually perform any function, users can always be locked out
Declaration
public Task SetLockoutEnabledAsync(BackOfficeIdentityUser user, bool enabled)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
SetLockoutEndDateAsync(BackOfficeIdentityUser, DateTimeOffset)
Locks a user out until the specified end date (set to a past date, to unlock a user)
Declaration
public Task SetLockoutEndDateAsync(BackOfficeIdentityUser user, DateTimeOffset lockoutEnd)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
SetPasswordHashAsync(BackOfficeIdentityUser, String)
Set the user password hash
Declaration
public Task SetPasswordHashAsync(BackOfficeIdentityUser user, string passwordHash)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
SetSecurityStampAsync(BackOfficeIdentityUser, String)
Set the security stamp for the user
Declaration
public Task SetSecurityStampAsync(BackOfficeIdentityUser user, string stamp)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
SetTwoFactorEnabledAsync(BackOfficeIdentityUser, Boolean)
Sets whether two factor authentication is enabled for the user
Declaration
public virtual Task SetTwoFactorEnabledAsync(BackOfficeIdentityUser user, bool enabled)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
UpdateAsync(BackOfficeIdentityUser)
Declaration
public Task UpdateAsync(BackOfficeIdentityUser user)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
View Source
ValidateSessionIdAsync(Int32, String)
Declaration
public Task<bool> ValidateSessionIdAsync(int userId, string sessionId)
Parameters
Type |
Name |
Description |
System.Int32 |
userId |
|
System.String |
sessionId |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|