View Source
Class MemberUserStore
A custom user store that uses Umbraco member data
Inheritance
System.Object
Assembly: Umbraco.Infrastructure.dll
Syntax
public class MemberUserStore : UmbracoUserStore<MemberIdentityUser, UmbracoIdentityRole>, IMemberUserStore
Constructors
View Source
MemberUserStore(IMemberService, IUmbracoMapper, ICoreScopeProvider, IdentityErrorDescriber, IPublishedSnapshotAccessor)
Declaration
public MemberUserStore(IMemberService memberService, IUmbracoMapper mapper, ICoreScopeProvider scopeProvider, IdentityErrorDescriber describer, IPublishedSnapshotAccessor publishedSnapshotAccessor)
Parameters
View Source
MemberUserStore(IMemberService, IUmbracoMapper, ICoreScopeProvider, IdentityErrorDescriber, IPublishedSnapshotAccessor, IExternalLoginWithKeyService)
Declaration
public MemberUserStore(IMemberService memberService, IUmbracoMapper mapper, ICoreScopeProvider scopeProvider, IdentityErrorDescriber describer, IPublishedSnapshotAccessor publishedSnapshotAccessor, IExternalLoginWithKeyService externalLoginService)
Parameters
View Source
MemberUserStore(IMemberService, IUmbracoMapper, ICoreScopeProvider, IdentityErrorDescriber, IPublishedSnapshotAccessor, IExternalLoginWithKeyService, ITwoFactorLoginService)
Initializes a new instance of the MemberUserStore class for the members identity store
Declaration
public MemberUserStore(IMemberService memberService, IUmbracoMapper mapper, ICoreScopeProvider scopeProvider, IdentityErrorDescriber describer, IPublishedSnapshotAccessor publishedSnapshotAccessor, IExternalLoginWithKeyService externalLoginService, ITwoFactorLoginService twoFactorLoginService)
Parameters
Methods
View Source
AddLoginAsync(MemberIdentityUser, UserLoginInfo, CancellationToken)
Declaration
public override Task AddLoginAsync(MemberIdentityUser user, UserLoginInfo login, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
MemberIdentityUser |
user |
|
UserLoginInfo |
login |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
CreateAsync(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> CreateAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|
View Source
DeleteAsync(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> DeleteAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|
View Source
FindByEmailAsync(String, CancellationToken)
Declaration
public override Task<MemberIdentityUser> FindByEmailAsync(string email, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
email |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
FindByNameAsync(String, CancellationToken)
Declaration
public override Task<MemberIdentityUser> FindByNameAsync(string userName, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
FindRoleAsync(String, CancellationToken)
Declaration
protected override Task<UmbracoIdentityRole> FindRoleAsync(string roleName, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
roleName |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
FindUserAsync(String, CancellationToken)
Declaration
protected override Task<MemberIdentityUser> FindUserAsync(string userId, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
userId |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
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<System.Nullable<Umbraco.Cms.Core.Security.IdentityUserLogin<System.String>>> |
|
View Source
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<System.Nullable<Umbraco.Cms.Core.Security.IdentityUserLogin<System.String>>> |
|
View Source
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<System.Nullable<IdentityUserRole<System.String>>> |
|
View Source
GetLoginsAsync(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IList<UserLoginInfo>> GetLoginsAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IList<UserLoginInfo>> |
|
View Source
GetPublishedMember(MemberIdentityUser)
Declaration
public IPublishedContent GetPublishedMember(MemberIdentityUser user)
Parameters
Returns
View Source
GetRolesAsync(MemberIdentityUser, CancellationToken)
Gets a list of role names the specified user belongs to.
Declaration
public override Task<IList<string>> GetRolesAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IList<System.String>> |
|
View Source
GetTokenAsync(MemberIdentityUser, String, String, CancellationToken)
Overridden to support Umbraco's own data storage requirements
Declaration
public override Task<string> GetTokenAsync(MemberIdentityUser user, string loginProvider, string name, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
MemberIdentityUser |
user |
|
System.String |
loginProvider |
|
System.String |
name |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<System.String> |
|
View Source
GetTwoFactorEnabledAsync(MemberIdentityUser, CancellationToken)
Declaration
public override async Task<bool> GetTwoFactorEnabledAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<System.Boolean> |
|
View Source
GetUsersInRoleAsync(String, CancellationToken)
Lists all users of a given role.
Declaration
public override Task<IList<MemberIdentityUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
roleName |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
IsInRoleAsync(MemberIdentityUser, String, CancellationToken)
Returns true if a user is in the role
Declaration
public override Task<bool> IsInRoleAsync(MemberIdentityUser user, string roleName, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
MemberIdentityUser |
user |
|
System.String |
roleName |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<System.Boolean> |
|
View Source
RemoveLoginAsync(MemberIdentityUser, String, String, CancellationToken)
Declaration
public override Task RemoveLoginAsync(MemberIdentityUser user, string loginProvider, string providerKey, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
MemberIdentityUser |
user |
|
System.String |
loginProvider |
|
System.String |
providerKey |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
SetTokenAsync(MemberIdentityUser, String, String, String, CancellationToken)
Overridden to support Umbraco's own data storage requirements
Declaration
public override Task SetTokenAsync(MemberIdentityUser user, string loginProvider, string name, string value, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
MemberIdentityUser |
user |
|
System.String |
loginProvider |
|
System.String |
name |
|
System.String |
value |
|
CancellationToken |
cancellationToken |
|
Returns
View Source
UpdateAsync(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> UpdateAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|