View Source
Class MemberManager
Inheritance
System.Object
Assembly: Umbraco.Web.Common.dll
Syntax
public class MemberManager : UmbracoUserManager<MemberIdentityUser, MemberPasswordConfigurationSettings>, IMemberManager, IUmbracoUserManager<MemberIdentityUser>
Constructors
View Source
MemberManager(IIpResolver, IMemberUserStore, IOptions<IdentityOptions>, IPasswordHasher<MemberIdentityUser>, IEnumerable<IUserValidator<MemberIdentityUser>>, IEnumerable<IPasswordValidator<MemberIdentityUser>>, IdentityErrorDescriber, IServiceProvider, ILogger<UserManager<MemberIdentityUser>>, IOptionsSnapshot<MemberPasswordConfigurationSettings>, IPublicAccessService, IHttpContextAccessor)
Declaration
public MemberManager(IIpResolver ipResolver, IMemberUserStore store, IOptions<IdentityOptions> optionsAccessor, IPasswordHasher<MemberIdentityUser> passwordHasher, IEnumerable<IUserValidator<MemberIdentityUser>> userValidators, IEnumerable<IPasswordValidator<MemberIdentityUser>> passwordValidators, IdentityErrorDescriber errors, IServiceProvider services, ILogger<UserManager<MemberIdentityUser>> logger, IOptionsSnapshot<MemberPasswordConfigurationSettings> passwordConfiguration, IPublicAccessService publicAccessService, IHttpContextAccessor httpContextAccessor)
Parameters
Type |
Name |
Description |
IIpResolver |
ipResolver |
|
IMemberUserStore |
store |
|
Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> |
optionsAccessor |
|
Microsoft.AspNetCore.Identity.IPasswordHasher<MemberIdentityUser> |
passwordHasher |
|
IEnumerable<Microsoft.AspNetCore.Identity.IUserValidator<MemberIdentityUser>> |
userValidators |
|
IEnumerable<Microsoft.AspNetCore.Identity.IPasswordValidator<MemberIdentityUser>> |
passwordValidators |
|
Microsoft.AspNetCore.Identity.IdentityErrorDescriber |
errors |
|
IServiceProvider |
services |
|
Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.UserManager<MemberIdentityUser>> |
logger |
|
Microsoft.Extensions.Options.IOptionsSnapshot<MemberPasswordConfigurationSettings> |
passwordConfiguration |
|
IPublicAccessService |
publicAccessService |
|
Microsoft.AspNetCore.Http.IHttpContextAccessor |
httpContextAccessor |
|
Methods
View Source
AsPublishedMember(MemberIdentityUser)
Declaration
public virtual IPublishedContent AsPublishedMember(MemberIdentityUser user)
Parameters
Returns
View Source
GetCurrentMemberAsync()
Declaration
public virtual async Task<MemberIdentityUser> GetCurrentMemberAsync()
Returns
View Source
IsLoggedIn()
Check if a member is logged in
Declaration
public virtual bool IsLoggedIn()
Returns
Type |
Description |
System.Boolean |
|
View Source
IsMemberAuthorizedAsync(Nullable<IEnumerable<String>>, Nullable<IEnumerable<String>>, Nullable<IEnumerable<Int32>>)
Declaration
public virtual async Task<bool> IsMemberAuthorizedAsync(IEnumerable<string>? allowTypes = null, IEnumerable<string>? allowGroups = null, IEnumerable<int>? allowMembers = null)
Parameters
Type |
Name |
Description |
System.Nullable<IEnumerable<System.String>> |
allowTypes |
|
System.Nullable<IEnumerable<System.String>> |
allowGroups |
|
System.Nullable<IEnumerable<System.Int32>> |
allowMembers |
|
Returns
Type |
Description |
Task<System.Boolean> |
|
View Source
IsProtectedAsync(IEnumerable<String>)
Declaration
public virtual Task<IReadOnlyDictionary<string, bool>> IsProtectedAsync(IEnumerable<string> paths)
Parameters
Type |
Name |
Description |
IEnumerable<System.String> |
paths |
|
Returns
Type |
Description |
Task<IReadOnlyDictionary<System.String, System.Boolean>> |
|
View Source
IsProtectedAsync(String)
Declaration
public virtual Task<bool> IsProtectedAsync(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Returns
Type |
Description |
Task<System.Boolean> |
|
View Source
MemberHasAccessAsync(IEnumerable<String>)
Declaration
public virtual async Task<IReadOnlyDictionary<string, bool>> MemberHasAccessAsync(IEnumerable<string> paths)
Parameters
Type |
Name |
Description |
IEnumerable<System.String> |
paths |
|
Returns
Type |
Description |
Task<IReadOnlyDictionary<System.String, System.Boolean>> |
|
View Source
MemberHasAccessAsync(String)
Declaration
public virtual async Task<bool> MemberHasAccessAsync(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Returns
Type |
Description |
Task<System.Boolean> |
|