Class BackOfficeUserStore
The user store for back office users
Inheritance
System.Object
Assembly: cs.temp.dll.dll
Syntax
public class BackOfficeUserStore : UmbracoUserStore<BackOfficeIdentityUser, IdentityRole<string>>, IUserSessionStore<BackOfficeIdentityUser>
Constructors
BackOfficeUserStore(IScopeProvider, IUserService, IEntityService, IExternalLoginService, IOptions<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches)
Declaration
[Obsolete("Use non obsolete ctor")]
public BackOfficeUserStore(IScopeProvider scopeProvider, IUserService userService, IEntityService entityService, IExternalLoginService externalLoginService, IOptions<GlobalSettings> globalSettings, IUmbracoMapper mapper, BackOfficeErrorDescriber describer, AppCaches appCaches)
Parameters
Type |
Name |
Description |
IScopeProvider |
scopeProvider |
|
IUserService |
userService |
|
IEntityService |
entityService |
|
IExternalLoginService |
externalLoginService |
|
IOptions<GlobalSettings> |
globalSettings |
|
IUmbracoMapper |
mapper |
|
BackOfficeErrorDescriber |
describer |
|
AppCaches |
appCaches |
|
BackOfficeUserStore(IScopeProvider, IUserService, IEntityService, IExternalLoginWithKeyService, IOptions<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches)
Declaration
[Obsolete("Use non obsolete ctor")]
public BackOfficeUserStore(IScopeProvider scopeProvider, IUserService userService, IEntityService entityService, IExternalLoginWithKeyService externalLoginService, IOptions<GlobalSettings> globalSettings, IUmbracoMapper mapper, BackOfficeErrorDescriber describer, AppCaches appCaches)
Parameters
Type |
Name |
Description |
IScopeProvider |
scopeProvider |
|
IUserService |
userService |
|
IEntityService |
entityService |
|
IExternalLoginWithKeyService |
externalLoginService |
|
IOptions<GlobalSettings> |
globalSettings |
|
IUmbracoMapper |
mapper |
|
BackOfficeErrorDescriber |
describer |
|
AppCaches |
appCaches |
|
BackOfficeUserStore(IScopeProvider, IUserService, IEntityService, IExternalLoginWithKeyService, IOptions<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches, ITwoFactorLoginService)
Declaration
public BackOfficeUserStore(IScopeProvider scopeProvider, IUserService userService, IEntityService entityService, IExternalLoginWithKeyService externalLoginService, IOptions<GlobalSettings> globalSettings, IUmbracoMapper mapper, BackOfficeErrorDescriber describer, AppCaches appCaches, ITwoFactorLoginService twoFactorLoginService)
Parameters
Type |
Name |
Description |
IScopeProvider |
scopeProvider |
|
IUserService |
userService |
|
IEntityService |
entityService |
|
IExternalLoginWithKeyService |
externalLoginService |
|
IOptions<GlobalSettings> |
globalSettings |
|
IUmbracoMapper |
mapper |
|
BackOfficeErrorDescriber |
describer |
|
AppCaches |
appCaches |
|
ITwoFactorLoginService |
twoFactorLoginService |
|
Methods
AddLoginAsync(BackOfficeIdentityUser, UserLoginInfo, CancellationToken)
Declaration
public override Task AddLoginAsync(BackOfficeIdentityUser user, UserLoginInfo login, CancellationToken cancellationToken = null)
Parameters
Returns
CreateAsync(BackOfficeIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> CreateAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|
DeleteAsync(BackOfficeIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> DeleteAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|
FindByEmailAsync(String, CancellationToken)
Declaration
public override Task<BackOfficeIdentityUser> FindByEmailAsync(string email, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
email |
|
CancellationToken |
cancellationToken |
|
Returns
FindByNameAsync(String, CancellationToken)
Declaration
public override Task<BackOfficeIdentityUser> FindByNameAsync(string userName, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
CancellationToken |
cancellationToken |
|
Returns
FindRoleAsync(String, CancellationToken)
Declaration
protected override Task<IdentityRole<string>> FindRoleAsync(string normalizedRoleName, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
normalizedRoleName |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<IdentityRole<System.String>> |
|
FindUserAsync(String, CancellationToken)
Declaration
protected override Task<BackOfficeIdentityUser> FindUserAsync(string userId, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
userId |
|
CancellationToken |
cancellationToken |
|
Returns
FindUserLoginAsync(String, String, CancellationToken)
Declaration
protected override Task<IdentityUserLogin<string>> FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
loginProvider |
|
System.String |
providerKey |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<IdentityUserLogin<System.String>> |
|
FindUserLoginAsync(String, String, String, CancellationToken)
Declaration
protected override async Task<IdentityUserLogin<string>> FindUserLoginAsync(string userId, string loginProvider, string providerKey, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
userId |
|
System.String |
loginProvider |
|
System.String |
providerKey |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<IdentityUserLogin<System.String>> |
|
FindUserRoleAsync(String, String, CancellationToken)
Declaration
protected override async Task<IdentityUserRole<string>> FindUserRoleAsync(string userId, string roleId, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
userId |
|
System.String |
roleId |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<IdentityUserRole<System.String>> |
|
GetLoginsAsync(BackOfficeIdentityUser, CancellationToken)
Declaration
public override Task<IList<UserLoginInfo>> GetLoginsAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<System.Collections.Generic.IList<UserLoginInfo>> |
|
GetTokenAsync(BackOfficeIdentityUser, String, String, CancellationToken)
Overridden to support Umbraco's own data storage requirements
Declaration
public override Task<string> GetTokenAsync(BackOfficeIdentityUser user, string loginProvider, string name, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
BackOfficeIdentityUser |
user |
|
System.String |
loginProvider |
|
System.String |
name |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<System.String> |
|
GetTwoFactorEnabledAsync(BackOfficeIdentityUser, CancellationToken)
Declaration
public override async Task<bool> GetTwoFactorEnabledAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<System.Boolean> |
|
GetUsersInRoleAsync(String, CancellationToken)
Lists all users of a given role.
Declaration
public override Task<IList<BackOfficeIdentityUser>> GetUsersInRoleAsync(string normalizedRoleName, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
normalizedRoleName |
|
CancellationToken |
cancellationToken |
|
Returns
RemoveLoginAsync(BackOfficeIdentityUser, String, String, CancellationToken)
Declaration
public override Task RemoveLoginAsync(BackOfficeIdentityUser user, string loginProvider, string providerKey, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
BackOfficeIdentityUser |
user |
|
System.String |
loginProvider |
|
System.String |
providerKey |
|
CancellationToken |
cancellationToken |
|
Returns
RemoveTokenAsync(BackOfficeIdentityUser, String, String, CancellationToken)
Overridden to support Umbraco's own data storage requirements
Declaration
public override Task RemoveTokenAsync(BackOfficeIdentityUser user, string loginProvider, string name, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
BackOfficeIdentityUser |
user |
|
System.String |
loginProvider |
|
System.String |
name |
|
CancellationToken |
cancellationToken |
|
Returns
SetPasswordHashAsync(BackOfficeIdentityUser, String, CancellationToken)
Declaration
public override async Task SetPasswordHashAsync(BackOfficeIdentityUser user, string passwordHash, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
BackOfficeIdentityUser |
user |
|
System.String |
passwordHash |
|
CancellationToken |
cancellationToken |
|
Returns
SetTokenAsync(BackOfficeIdentityUser, String, String, String, CancellationToken)
Overridden to support Umbraco's own data storage requirements
Declaration
public override Task SetTokenAsync(BackOfficeIdentityUser user, string loginProvider, string name, string value, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
BackOfficeIdentityUser |
user |
|
System.String |
loginProvider |
|
System.String |
name |
|
System.String |
value |
|
CancellationToken |
cancellationToken |
|
Returns
UpdateAsync(BackOfficeIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> UpdateAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|
ValidateSessionIdAsync(String, String)
Validates a user's session is still valid
Declaration
public Task<bool> ValidateSessionIdAsync(string userId, string sessionId)
Parameters
Type |
Name |
Description |
System.String |
userId |
|
System.String |
sessionId |
|
Returns
Type |
Description |
Task<System.Boolean> |
|