Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IBackOfficeExternalLoginService

    Provides methods for managing external authentication and login providers in the back office.

    Namespace: Umbraco.Cms.Api.Management.Services
    Assembly: Umbraco.Cms.Api.Management.dll
    Syntax
    public interface IBackOfficeExternalLoginService

    Methods

    View Source

    ClaimsPrincipleFromLoginProviderLinkKeyAsync(string, Guid)

    Retrieves a ClaimsPrincipal based on the specified login provider and link key.

    Declaration
    Task<Attempt<ClaimsPrincipal?, ExternalLoginOperationStatus>> ClaimsPrincipleFromLoginProviderLinkKeyAsync(string loginProvider, Guid linkKey)
    Parameters
    Type Name Description
    string loginProvider

    The login provider identifier.

    Guid linkKey

    The unique link key associated with the external login.

    Returns
    Type Description
    Task<Attempt<ClaimsPrincipal, ExternalLoginOperationStatus>>

    An Attempt containing a ClaimsPrincipal if successful, or an ExternalLoginOperationStatus indicating failure.

    View Source

    ExternalLoginStatusForUserAsync(Guid)

    Gets the external login status for a user.

    Declaration
    Task<Attempt<IEnumerable<UserExternalLoginProviderModel>, ExternalLoginOperationStatus>> ExternalLoginStatusForUserAsync(Guid userKey)
    Parameters
    Type Name Description
    Guid userKey

    The unique identifier of the user.

    Returns
    Type Description
    Task<Attempt<IEnumerable<UserExternalLoginProviderModel>, ExternalLoginOperationStatus>>

    A task that represents the asynchronous operation. The task result contains an attempt with the external login providers and the operation status.

    View Source

    GenerateLoginProviderSecretAsync(ClaimsPrincipal, string)

    Generates a secret for the specified external login provider.

    Declaration
    Task<Attempt<Guid?, ExternalLoginOperationStatus>> GenerateLoginProviderSecretAsync(ClaimsPrincipal claimsPrincipal, string loginProvider)
    Parameters
    Type Name Description
    ClaimsPrincipal claimsPrincipal

    The claims principal representing the user.

    string loginProvider

    The external login provider identifier.

    Returns
    Type Description
    Task<Attempt<Guid?, ExternalLoginOperationStatus>>

    An attempt containing the generated secret's GUID if successful, along with the operation status.

    View Source

    HandleLoginCallbackAsync(HttpContext)

    Handles the login callback from an external login provider.

    Declaration
    Task<Attempt<IEnumerable<IdentityError>, ExternalLoginOperationStatus>> HandleLoginCallbackAsync(HttpContext httpContext)
    Parameters
    Type Name Description
    HttpContext httpContext

    The current HTTP context.

    Returns
    Type Description
    Task<Attempt<IEnumerable<IdentityError>, ExternalLoginOperationStatus>>

    A task that represents the asynchronous operation. The task result contains an attempt with either a collection of identity errors or the external login operation status.

    View Source

    UnLinkLoginAsync(ClaimsPrincipal, string, string)

    Unlinks an external login from the specified back office user.

    Declaration
    Task<Attempt<ExternalLoginOperationStatus>> UnLinkLoginAsync(ClaimsPrincipal claimsPrincipal, string loginProvider, string providerKey)
    Parameters
    Type Name Description
    ClaimsPrincipal claimsPrincipal

    The claims principal representing the back office user.

    string loginProvider

    The external login provider to unlink.

    string providerKey

    The key identifying the external login to unlink.

    Returns
    Type Description
    Task<Attempt<ExternalLoginOperationStatus>>

    An attempt result indicating the status of the unlink operation.

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