Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoUserStore<TUser, TRole>

    Represents a user store for Umbraco identity management, providing operations for managing users and their roles.

    Inheritance
    object
    UserStoreBase<TUser, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>>
    UserStoreBase<TUser, TRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityUserToken<string>, IdentityRoleClaim<string>>
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public abstract class UmbracoUserStore<TUser, TRole> : UserStoreBase<TUser, TRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityUserToken<string>, IdentityRoleClaim<string>> where TUser : UmbracoIdentityUser where TRole : IdentityRole<string>
    Type Parameters
    Name Description
    TUser

    The type of the user entity.

    TRole

    The type of the role entity.

    Constructors

    View Source

    UmbracoUserStore(IdentityErrorDescriber)

    Declaration
    protected UmbracoUserStore(IdentityErrorDescriber describer)
    Parameters
    Type Name Description
    IdentityErrorDescriber describer

    Properties

    View Source

    Users

    Not supported in Umbraco

    Declaration
    public override IQueryable<TUser> Users { get; }
    Property Value
    Type Description
    IQueryable<TUser>

    Methods

    View Source

    AddClaimsAsync(TUser, IEnumerable<Claim>, CancellationToken)

    Not supported in Umbraco

    Declaration
    public override Task AddClaimsAsync(TUser user, IEnumerable<Claim> claims, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    IEnumerable<Claim> claims
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    AddToRoleAsync(TUser, string, CancellationToken)

    Asynchronously adds the specified user to the given role (user group).

    Declaration
    public override Task AddToRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user

    The user to add to the role.

    string normalizedRoleName

    The normalized name of the role to add the user to.

    CancellationToken cancellationToken

    A cancellation token to observe while waiting for the task to complete.

    Returns
    Type Description
    Task

    A task that represents the asynchronous add-to-role operation.

    View Source

    AddUserTokenAsync(IdentityUserToken<string>)

    Not supported in Umbraco, see comments above on GetTokenAsync, RemoveTokenAsync, SetTokenAsync

    Declaration
    protected override Task AddUserTokenAsync(IdentityUserToken<string> token)
    Parameters
    Type Name Description
    IdentityUserToken<string> token
    Returns
    Type Description
    Task
    View Source

    FindByIdAsync(string, CancellationToken)

    Declaration
    public override Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string userId
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<TUser>
    View Source

    FindTokenAsync(TUser, string, string, CancellationToken)

    Not supported in Umbraco, see comments above on GetTokenAsync, RemoveTokenAsync, SetTokenAsync

    Declaration
    protected override Task<IdentityUserToken<string>?> FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    TUser user
    string loginProvider
    string name
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IdentityUserToken<string>>
    View Source

    GetClaimsAsync(TUser, CancellationToken)

    Not supported in Umbraco

    Declaration
    public override Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IList<Claim>>
    View Source

    GetNormalizedEmailAsync(TUser, CancellationToken)

    Declaration
    public override Task<string?> GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    TUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<string>
    View Source

    GetNormalizedUserNameAsync(TUser, CancellationToken)

    Declaration
    public override Task<string?> GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<string>
    View Source

    GetRolesAsync(TUser, CancellationToken)

    Asynchronously retrieves the list of role names that the specified user belongs to.

    Declaration
    public override Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user

    The user for whom to retrieve role names.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task<IList<string>>

    A task that represents the asynchronous operation. The task result contains a list of role names associated with the user.

    View Source

    GetSecurityStampAsync(TUser, CancellationToken)

    Declaration
    public override Task<string?> GetSecurityStampAsync(TUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<string>
    View Source

    GetUsersForClaimAsync(Claim, CancellationToken)

    Not supported in Umbraco

    Declaration
    public override Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Claim claim
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IList<TUser>>
    View Source

    HasPasswordAsync(TUser, CancellationToken)

    Declaration
    public override Task<bool> HasPasswordAsync(TUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<bool>
    View Source

    IsInRoleAsync(TUser, string, CancellationToken)

    Determines whether the specified user is a member of the given role.

    Declaration
    public override Task<bool> IsInRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user

    The user whose membership is to be checked.

    string normalizedRoleName

    The normalized name of the role to check membership for.

    CancellationToken cancellationToken

    A cancellation token that can be used to cancel the operation.

    Returns
    Type Description
    Task<bool>

    True if the user is in the specified role; otherwise, false.

    View Source

    RemoveClaimsAsync(TUser, IEnumerable<Claim>, CancellationToken)

    Not supported in Umbraco

    Declaration
    public override Task RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    IEnumerable<Claim> claims
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    RemoveFromRoleAsync(TUser, string, CancellationToken)

    Removes a role (user group) from the specified user asynchronously.

    Declaration
    public override Task RemoveFromRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user

    The user from whom to remove the role.

    string normalizedRoleName

    The normalized name of the role to remove from the user.

    CancellationToken cancellationToken

    A cancellation token to cancel the operation.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task that represents the asynchronous remove operation.

    View Source

    RemoveUserTokenAsync(IdentityUserToken<string>)

    Not supported in Umbraco, see comments above on GetTokenAsync, RemoveTokenAsync, SetTokenAsync

    Declaration
    protected override Task RemoveUserTokenAsync(IdentityUserToken<string> token)
    Parameters
    Type Name Description
    IdentityUserToken<string> token
    Returns
    Type Description
    Task
    View Source

    ReplaceClaimAsync(TUser, Claim, Claim, CancellationToken)

    Not supported in Umbraco

    Declaration
    public override Task ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    Claim claim
    Claim newClaim
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    ResolveEntityIdFromIdentityId(string?)

    Declaration
    protected abstract Task<int> ResolveEntityIdFromIdentityId(string? identityId)
    Parameters
    Type Name Description
    string identityId
    Returns
    Type Description
    Task<int>
    View Source

    SetNormalizedEmailAsync(TUser, string?, CancellationToken)

    Declaration
    public override Task SetNormalizedEmailAsync(TUser user, string? normalizedEmail, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    TUser user
    string normalizedEmail
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    SetNormalizedUserNameAsync(TUser, string?, CancellationToken)

    Declaration
    public override Task SetNormalizedUserNameAsync(TUser user, string? normalizedName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    string normalizedName
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    SetPasswordHashAsync(TUser, string?, CancellationToken)

    Declaration
    public override Task SetPasswordHashAsync(TUser user, string? passwordHash, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    string passwordHash
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    View Source

    TryConvertIdentityIdToInt(string?, out int)

    Declaration
    protected static bool TryConvertIdentityIdToInt(string? userId, out int intId)
    Parameters
    Type Name Description
    string userId
    int intId
    Returns
    Type Description
    bool
    View Source

    UserIdToString(int)

    Declaration
    protected static string UserIdToString(int userId)
    Parameters
    Type Name Description
    int userId
    Returns
    Type Description
    string
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX