Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoUserStore<TUser, TRole>

    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
    TRole

    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)

    Adds a user to a role (user group)

    Declaration
    public override Task AddToRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    string normalizedRoleName
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    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)

    Gets a list of role names the specified user belongs to.

    Declaration
    public override Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IList<string>>
    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)

    Returns true if a user is in the role

    Declaration
    public override Task<bool> IsInRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    string normalizedRoleName
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<bool>
    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 the role (user group) for the user

    Declaration
    public override Task RemoveFromRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TUser user
    string normalizedRoleName
    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    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