Search Results for

    Show / Hide Table of Contents
    View Source

    Class BackOfficeUserClientCredentialsManager

    Provides functionality to manage client credentials associated with back office users in Umbraco.

    Inheritance
    object
    ClientCredentialsManagerBase
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public sealed class BackOfficeUserClientCredentialsManager : ClientCredentialsManagerBase, IBackOfficeUserClientCredentialsManager

    Constructors

    View Source

    BackOfficeUserClientCredentialsManager(IBackOfficeUserManager, IBackOfficeApplicationManager, IUserService)

    Initializes a new instance of the BackOfficeUserClientCredentialsManager class, which manages client credentials for back office users.

    Declaration
    public BackOfficeUserClientCredentialsManager(IBackOfficeUserManager backOfficeUserManager, IBackOfficeApplicationManager backOfficeApplicationManager, IUserService userService)
    Parameters
    Type Name Description
    IBackOfficeUserManager backOfficeUserManager

    The manager responsible for handling back office user operations.

    IBackOfficeApplicationManager backOfficeApplicationManager

    The manager responsible for handling back office application operations.

    IUserService userService

    The service used for user-related operations.

    Properties

    View Source

    ClientIdPrefix

    Declaration
    protected override string ClientIdPrefix { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    DeleteAsync(Guid, string)

    Deletes the client credentials associated with the specified back office user and client ID.

    Declaration
    public Task<Attempt<BackOfficeUserClientCredentialsOperationStatus>> DeleteAsync(Guid userKey, string clientId)
    Parameters
    Type Name Description
    Guid userKey

    The unique identifier of the back office user.

    string clientId

    The client ID of the credentials to delete.

    Returns
    Type Description
    Task<Attempt<BackOfficeUserClientCredentialsOperationStatus>>

    An Attempt&lt;BackOfficeUserClientCredentialsOperationStatus&gt; indicating the result of the delete operation.

    View Source

    FindUserAsync(string)

    Asynchronously finds a back office user associated with the specified client ID.

    Declaration
    public Task<BackOfficeIdentityUser?> FindUserAsync(string clientId)
    Parameters
    Type Name Description
    string clientId

    The client ID used to locate the back office user.

    Returns
    Type Description
    Task<BackOfficeIdentityUser>

    A task representing the asynchronous operation. The task result contains the BackOfficeIdentityUser if a matching and approved user is found; otherwise, null.

    View Source

    GetClientIdsAsync(Guid)

    Gets the client IDs associated with the specified back office user.

    Declaration
    public Task<IEnumerable<string>> GetClientIdsAsync(Guid userKey)
    Parameters
    Type Name Description
    Guid userKey

    The unique identifier of the back office user.

    Returns
    Type Description
    Task<IEnumerable<string>>

    A task that represents the asynchronous operation. The task result contains an enumerable of client ID strings.

    View Source

    SaveAsync(Guid, string, string)

    Asynchronously saves the client credentials for a specified back office user.

    Declaration
    public Task<Attempt<BackOfficeUserClientCredentialsOperationStatus>> SaveAsync(Guid userKey, string clientId, string clientSecret)
    Parameters
    Type Name Description
    Guid userKey

    The unique identifier (System.Guid) of the back office user.

    string clientId

    The client identifier to associate with the user. This value will be sanitized before use.

    string clientSecret

    The client secret to associate with the client identifier.

    Returns
    Type Description
    Task<Attempt<BackOfficeUserClientCredentialsOperationStatus>>

    A System.Threading.Tasks.Task representing the asynchronous operation. The result contains an Attempt<TResult> indicating whether the credentials were saved successfully or if an error occurred (such as invalid user, duplicate client ID, or invalid client ID).

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX