Search Results for

    Show / Hide Table of Contents
    View Source

    Class BackOfficeUserStore

    The user store for back office users

    Inheritance
    System.Object
    UmbracoUserStore<BackOfficeIdentityUser, IdentityRole<System.String>>
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class BackOfficeUserStore : UmbracoUserStore<BackOfficeIdentityUser, IdentityRole<string>>, IUserSessionStore<BackOfficeIdentityUser>, IBackOfficeUserStore

    Constructors

    View Source

    BackOfficeUserStore(ICoreScopeProvider, IEntityService, IExternalLoginWithKeyService, IOptionsSnapshot<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches, ITwoFactorLoginService, IUserGroupService, IUserRepository, IRuntimeState, IEventMessagesFactory, ILogger<BackOfficeUserStore>)

    Initializes a new instance of the BackOfficeUserStore class.

    Declaration
    public BackOfficeUserStore(ICoreScopeProvider scopeProvider, IEntityService entityService, IExternalLoginWithKeyService externalLoginService, IOptionsSnapshot<GlobalSettings> globalSettings, IUmbracoMapper mapper, BackOfficeErrorDescriber describer, AppCaches appCaches, ITwoFactorLoginService twoFactorLoginService, IUserGroupService userGroupService, IUserRepository userRepository, IRuntimeState runtimeState, IEventMessagesFactory eventMessagesFactory, ILogger<BackOfficeUserStore> logger)
    Parameters
    Type Name Description
    ICoreScopeProvider scopeProvider
    IEntityService entityService
    IExternalLoginWithKeyService externalLoginService
    IOptionsSnapshot<GlobalSettings> globalSettings
    IUmbracoMapper mapper
    BackOfficeErrorDescriber describer
    AppCaches appCaches
    ITwoFactorLoginService twoFactorLoginService
    IUserGroupService userGroupService
    IUserRepository userRepository
    IRuntimeState runtimeState
    IEventMessagesFactory eventMessagesFactory
    ILogger<BackOfficeUserStore> logger

    Methods

    View Source

    AddLoginAsync(BackOfficeIdentityUser, UserLoginInfo, CancellationToken)

    Declaration
    public override Task AddLoginAsync(BackOfficeIdentityUser user, UserLoginInfo login, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    UserLoginInfo login
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    CreateAsync(BackOfficeIdentityUser, CancellationToken)

    Declaration
    public override Task<IdentityResult> CreateAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IdentityResult>
    View Source

    DeleteAsync(BackOfficeIdentityUser, CancellationToken)

    Declaration
    public override Task<IdentityResult> DeleteAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IdentityResult>
    View Source

    DisableAsync(IUser)

    Declaration
    public Task<UserOperationStatus> DisableAsync(IUser user)
    Parameters
    Type Name Description
    IUser user
    Returns
    Type Description
    Task<UserOperationStatus>
    View Source

    FindByEmailAsync(String, CancellationToken)

    Declaration
    public override async Task<BackOfficeIdentityUser> FindByEmailAsync(string email, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String email
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<BackOfficeIdentityUser>
    View Source

    FindByNameAsync(String, CancellationToken)

    Declaration
    public override async Task<BackOfficeIdentityUser> FindByNameAsync(string userName, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String userName
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<BackOfficeIdentityUser>
    View Source

    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<System.Nullable<IdentityRole<System.String>>>
    View Source

    FindUserAsync(String, CancellationToken)

    Declaration
    protected override Task<BackOfficeIdentityUser> FindUserAsync(string userId, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.String userId
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<BackOfficeIdentityUser>
    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

    GetAllInGroupAsync(Int32)

    Declaration
    public Task<IEnumerable<IUser>> GetAllInGroupAsync(int groupId)
    Parameters
    Type Name Description
    System.Int32 groupId
    Returns
    Type Description
    Task<IEnumerable<IUser>>
    View Source

    GetAsync(Guid)

    Declaration
    public Task<IUser> GetAsync(Guid key)
    Parameters
    Type Name Description
    Guid key
    Returns
    Type Description
    Task<IUser>
    View Source

    GetAsync(Int32)

    Declaration
    public Task<IUser> GetAsync(int id)
    Parameters
    Type Name Description
    System.Int32 id
    Returns
    Type Description
    Task<IUser>
    View Source

    GetByEmailAsync(String)

    Declaration
    public Task<IUser> GetByEmailAsync(string email)
    Parameters
    Type Name Description
    System.String email
    Returns
    Type Description
    Task<IUser>
    View Source

    GetByUserNameAsync(String)

    Declaration
    public Task<IUser> GetByUserNameAsync(string username)
    Parameters
    Type Name Description
    System.String username
    Returns
    Type Description
    Task<IUser>
    View Source

    GetLoginsAsync(BackOfficeIdentityUser, CancellationToken)

    Declaration
    public override Task<IList<UserLoginInfo>> GetLoginsAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IList<UserLoginInfo>>
    View Source

    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>
    Remarks

    The base class's implementation of this calls into FindTokenAsync, RemoveUserTokenAsync and AddUserTokenAsync, both methods will only work with ORMs that are change tracking ORMs like EFCore.

    View Source

    GetTwoFactorEnabledAsync(BackOfficeIdentityUser, CancellationToken)

    Declaration
    public override async Task<bool> GetTwoFactorEnabledAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<System.Boolean>
    View Source

    GetUsersAsync(Guid[])

    Declaration
    public Task<IEnumerable<IUser>> GetUsersAsync(params Guid[] keys)
    Parameters
    Type Name Description
    Guid[] keys
    Returns
    Type Description
    Task<IEnumerable<IUser>>
    View Source

    GetUsersAsync(Int32[])

    Declaration
    public Task<IEnumerable<IUser>> GetUsersAsync(params int[] ids)
    Parameters
    Type Name Description
    System.Int32[] ids
    Returns
    Type Description
    Task<IEnumerable<IUser>>
    View Source

    GetUsersInRoleAsync(String, CancellationToken)

    Lists all users of a given role.

    Declaration
    public override async Task<IList<BackOfficeIdentityUser>> GetUsersInRoleAsync(string normalizedRoleName, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String normalizedRoleName
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IList<BackOfficeIdentityUser>>
    Remarks

    Identity Role names are equal to Umbraco UserGroup alias.

    View Source

    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
    Type Description
    Task
    View Source

    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
    Type Description
    Task
    Remarks

    The base class's implementation of this calls into FindTokenAsync, RemoveUserTokenAsync and AddUserTokenAsync, both methods will only work with ORMs that are change tracking ORMs like EFCore.

    View Source

    ResolveEntityIdFromIdentityId(String)

    Declaration
    protected override async Task<int> ResolveEntityIdFromIdentityId(string identityId)
    Parameters
    Type Name Description
    System.String identityId
    Returns
    Type Description
    Task<System.Int32>
    View Source

    SaveAsync(IUser)

    Declaration
    public Task<UserOperationStatus> SaveAsync(IUser user)
    Parameters
    Type Name Description
    IUser user
    Returns
    Type Description
    Task<UserOperationStatus>
    View Source

    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
    Type Description
    Task
    View Source

    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
    Type Description
    Task
    Remarks

    The base class's implementation of this calls into FindTokenAsync and AddUserTokenAsync, both methods will only work with ORMs that are change tracking ORMs like EFCore.

    View Source

    UpdateAsync(BackOfficeIdentityUser, CancellationToken)

    Declaration
    public override Task<IdentityResult> UpdateAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IdentityResult>
    View Source

    ValidateSessionIdAsync(String, String)

    Validates a user's session is still valid

    Declaration
    public async Task<bool> ValidateSessionIdAsync(string userId, string sessionId)
    Parameters
    Type Name Description
    System.String userId
    System.String sessionId
    Returns
    Type Description
    Task<System.Boolean>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • BackOfficeUserStore(ICoreScopeProvider, IEntityService, IExternalLoginWithKeyService, IOptionsSnapshot<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches, ITwoFactorLoginService, IUserGroupService, IUserRepository, IRuntimeState, IEventMessagesFactory, ILogger<BackOfficeUserStore>)
    • Methods
      • AddLoginAsync(BackOfficeIdentityUser, UserLoginInfo, CancellationToken)
      • CreateAsync(BackOfficeIdentityUser, CancellationToken)
      • DeleteAsync(BackOfficeIdentityUser, CancellationToken)
      • DisableAsync(IUser)
      • FindByEmailAsync(String, CancellationToken)
      • FindByNameAsync(String, CancellationToken)
      • FindRoleAsync(String, CancellationToken)
      • FindUserAsync(String, CancellationToken)
      • FindUserLoginAsync(String, String, CancellationToken)
      • FindUserLoginAsync(String, String, String, CancellationToken)
      • FindUserRoleAsync(String, String, CancellationToken)
      • GetAllInGroupAsync(Int32)
      • GetAsync(Guid)
      • GetAsync(Int32)
      • GetByEmailAsync(String)
      • GetByUserNameAsync(String)
      • GetLoginsAsync(BackOfficeIdentityUser, CancellationToken)
      • GetTokenAsync(BackOfficeIdentityUser, String, String, CancellationToken)
      • GetTwoFactorEnabledAsync(BackOfficeIdentityUser, CancellationToken)
      • GetUsersAsync(Guid[])
      • GetUsersAsync(Int32[])
      • GetUsersInRoleAsync(String, CancellationToken)
      • RemoveLoginAsync(BackOfficeIdentityUser, String, String, CancellationToken)
      • RemoveTokenAsync(BackOfficeIdentityUser, String, String, CancellationToken)
      • ResolveEntityIdFromIdentityId(String)
      • SaveAsync(IUser)
      • SetPasswordHashAsync(BackOfficeIdentityUser, String, CancellationToken)
      • SetTokenAsync(BackOfficeIdentityUser, String, String, String, CancellationToken)
      • UpdateAsync(BackOfficeIdentityUser, CancellationToken)
      • ValidateSessionIdAsync(String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX