Class MemberUserStore
A custom user store that uses Umbraco member data
Inheritance
System.Object
Assembly: cs.temp.dll.dll
Syntax
public class MemberUserStore : UmbracoUserStore<MemberIdentityUser, UmbracoIdentityRole>, IMemberUserStore
Constructors
MemberUserStore(IMemberService, IUmbracoMapper, IScopeProvider, IdentityErrorDescriber, IPublishedSnapshotAccessor)
Declaration
[Obsolete("Use ctor with IExternalLoginWithKeyService and ITwoFactorLoginService param")]
public MemberUserStore(IMemberService memberService, IUmbracoMapper mapper, IScopeProvider scopeProvider, IdentityErrorDescriber describer, IPublishedSnapshotAccessor publishedSnapshotAccessor)
Parameters
Type |
Name |
Description |
IMemberService |
memberService |
|
IUmbracoMapper |
mapper |
|
IScopeProvider |
scopeProvider |
|
IdentityErrorDescriber |
describer |
|
IPublishedSnapshotAccessor |
publishedSnapshotAccessor |
|
MemberUserStore(IMemberService, IUmbracoMapper, IScopeProvider, IdentityErrorDescriber, IPublishedSnapshotAccessor, IExternalLoginService)
Declaration
[Obsolete("Use ctor with IExternalLoginWithKeyService and ITwoFactorLoginService param")]
public MemberUserStore(IMemberService memberService, IUmbracoMapper mapper, IScopeProvider scopeProvider, IdentityErrorDescriber describer, IPublishedSnapshotAccessor publishedSnapshotAccessor, IExternalLoginService externalLoginService)
Parameters
Type |
Name |
Description |
IMemberService |
memberService |
|
IUmbracoMapper |
mapper |
|
IScopeProvider |
scopeProvider |
|
IdentityErrorDescriber |
describer |
|
IPublishedSnapshotAccessor |
publishedSnapshotAccessor |
|
IExternalLoginService |
externalLoginService |
|
MemberUserStore(IMemberService, IUmbracoMapper, IScopeProvider, IdentityErrorDescriber, IPublishedSnapshotAccessor, IExternalLoginWithKeyService, ITwoFactorLoginService)
Initializes a new instance of the MemberUserStore class for the members identity store
Declaration
public MemberUserStore(IMemberService memberService, IUmbracoMapper mapper, IScopeProvider scopeProvider, IdentityErrorDescriber describer, IPublishedSnapshotAccessor publishedSnapshotAccessor, IExternalLoginWithKeyService externalLoginService, ITwoFactorLoginService twoFactorLoginService)
Parameters
Type |
Name |
Description |
IMemberService |
memberService |
The member service
|
IUmbracoMapper |
mapper |
The mapper for properties
|
IScopeProvider |
scopeProvider |
The scope provider
|
IdentityErrorDescriber |
describer |
The error describer
|
IPublishedSnapshotAccessor |
publishedSnapshotAccessor |
The published snapshot accessor
|
IExternalLoginWithKeyService |
externalLoginService |
The external login service
|
ITwoFactorLoginService |
twoFactorLoginService |
The two factor login service
|
Methods
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
CreateAsync(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> CreateAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|
DeleteAsync(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> DeleteAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|
FindByEmailAsync(String, CancellationToken)
Declaration
public override Task<MemberIdentityUser> FindByEmailAsync(string email, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
email |
|
CancellationToken |
cancellationToken |
|
Returns
FindByNameAsync(String, CancellationToken)
Declaration
public override Task<MemberIdentityUser> FindByNameAsync(string userName, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
userName |
|
CancellationToken |
cancellationToken |
|
Returns
FindRoleAsync(String, CancellationToken)
Declaration
protected override Task<UmbracoIdentityRole> FindRoleAsync(string roleName, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
roleName |
|
CancellationToken |
cancellationToken |
|
Returns
FindUserAsync(String, CancellationToken)
Declaration
protected override Task<MemberIdentityUser> 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(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IList<UserLoginInfo>> GetLoginsAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<System.Collections.Generic.IList<UserLoginInfo>> |
|
GetPublishedMember(MemberIdentityUser)
Declaration
public IPublishedContent GetPublishedMember(MemberIdentityUser user)
Parameters
Returns
Type |
Description |
IPublishedContent |
|
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<System.Collections.Generic.IList<System.String>> |
|
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> |
|
GetTwoFactorEnabledAsync(MemberIdentityUser, CancellationToken)
Declaration
public override async Task<bool> GetTwoFactorEnabledAsync(MemberIdentityUser 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<MemberIdentityUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
roleName |
|
CancellationToken |
cancellationToken |
|
Returns
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> |
|
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
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
UpdateAsync(MemberIdentityUser, CancellationToken)
Declaration
public override Task<IdentityResult> UpdateAsync(MemberIdentityUser user, CancellationToken cancellationToken = null)
Parameters
Returns
Type |
Description |
Task<IdentityResult> |
|