• Core
  • Infrastructure
  • Web
  • Extensions
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>

    Constructors

    View Source

    BackOfficeUserStore(ICoreScopeProvider, IUserService, IEntityService, IExternalLoginWithKeyService, IOptions<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches)

    Declaration
    public BackOfficeUserStore(ICoreScopeProvider scopeProvider, IUserService userService, IEntityService entityService, IExternalLoginWithKeyService externalLoginService, IOptions<GlobalSettings> globalSettings, IUmbracoMapper mapper, BackOfficeErrorDescriber describer, AppCaches appCaches)
    Parameters
    Type Name Description
    ICoreScopeProvider scopeProvider
    IUserService userService
    IEntityService entityService
    IExternalLoginWithKeyService externalLoginService
    IOptions<GlobalSettings> globalSettings
    IUmbracoMapper mapper
    BackOfficeErrorDescriber describer
    AppCaches appCaches
    View Source

    BackOfficeUserStore(ICoreScopeProvider, IUserService, IEntityService, IExternalLoginWithKeyService, IOptionsSnapshot<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches, ITwoFactorLoginService)

    Initializes a new instance of the BackOfficeUserStore class.

    Declaration
    public BackOfficeUserStore(ICoreScopeProvider scopeProvider, IUserService userService, IEntityService entityService, IExternalLoginWithKeyService externalLoginService, IOptionsSnapshot<GlobalSettings> globalSettings, IUmbracoMapper mapper, BackOfficeErrorDescriber describer, AppCaches appCaches, ITwoFactorLoginService twoFactorLoginService)
    Parameters
    Type Name Description
    ICoreScopeProvider scopeProvider
    IUserService userService
    IEntityService entityService
    IExternalLoginWithKeyService externalLoginService
    IOptionsSnapshot<GlobalSettings> globalSettings
    IUmbracoMapper mapper
    BackOfficeErrorDescriber describer
    AppCaches appCaches
    ITwoFactorLoginService twoFactorLoginService

    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

    FindByEmailAsync(String, CancellationToken)

    Declaration
    public override 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 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

    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

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

    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 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, IUserService, IEntityService, IExternalLoginWithKeyService, IOptions<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches)
      • BackOfficeUserStore(ICoreScopeProvider, IUserService, IEntityService, IExternalLoginWithKeyService, IOptionsSnapshot<GlobalSettings>, IUmbracoMapper, BackOfficeErrorDescriber, AppCaches, ITwoFactorLoginService)
    • Methods
      • AddLoginAsync(BackOfficeIdentityUser, UserLoginInfo, CancellationToken)
      • CreateAsync(BackOfficeIdentityUser, CancellationToken)
      • DeleteAsync(BackOfficeIdentityUser, CancellationToken)
      • 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)
      • GetLoginsAsync(BackOfficeIdentityUser, CancellationToken)
      • GetTokenAsync(BackOfficeIdentityUser, String, String, CancellationToken)
      • GetTwoFactorEnabledAsync(BackOfficeIdentityUser, CancellationToken)
      • GetUsersInRoleAsync(String, CancellationToken)
      • RemoveLoginAsync(BackOfficeIdentityUser, String, String, CancellationToken)
      • RemoveTokenAsync(BackOfficeIdentityUser, String, String, CancellationToken)
      • 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