Search Results for

    Show / Hide Table of Contents
    View Source

    Class BackOfficeSignInManager

    The sign in manager for back office users

    Inheritance
    object
    SignInManager<BackOfficeIdentityUser>
    UmbracoSignInManager<BackOfficeIdentityUser>
    Namespace: Umbraco.Cms.Api.Management.Security
    Assembly: Umbraco.Cms.Api.Management.dll
    Syntax
    public class BackOfficeSignInManager : UmbracoSignInManager<BackOfficeIdentityUser>, IBackOfficeSignInManager, ICoreBackOfficeSignInManager

    Constructors

    View Source

    BackOfficeSignInManager(BackOfficeUserManager, IHttpContextAccessor, IBackOfficeExternalLoginProviders, IUserClaimsPrincipalFactory<BackOfficeIdentityUser>, IOptions<IdentityOptions>, IOptions<GlobalSettings>, ILogger<SignInManager<BackOfficeIdentityUser>>, IAuthenticationSchemeProvider, IUserConfirmation<BackOfficeIdentityUser>, IEventAggregator, IOptions<SecuritySettings>, IOptions<BackOfficeAuthenticationTypeSettings>, IRequestCache)

    Declaration
    public BackOfficeSignInManager(BackOfficeUserManager userManager, IHttpContextAccessor contextAccessor, IBackOfficeExternalLoginProviders externalLogins, IUserClaimsPrincipalFactory<BackOfficeIdentityUser> claimsFactory, IOptions<IdentityOptions> optionsAccessor, IOptions<GlobalSettings> globalSettings, ILogger<SignInManager<BackOfficeIdentityUser>> logger, IAuthenticationSchemeProvider schemes, IUserConfirmation<BackOfficeIdentityUser> confirmation, IEventAggregator eventAggregator, IOptions<SecuritySettings> securitySettings, IOptions<BackOfficeAuthenticationTypeSettings> backOfficeAuthenticationTypeSettings, IRequestCache requestCache)
    Parameters
    Type Name Description
    BackOfficeUserManager userManager
    IHttpContextAccessor contextAccessor
    IBackOfficeExternalLoginProviders externalLogins
    IUserClaimsPrincipalFactory<BackOfficeIdentityUser> claimsFactory
    IOptions<IdentityOptions> optionsAccessor
    IOptions<GlobalSettings> globalSettings
    ILogger<SignInManager<BackOfficeIdentityUser>> logger
    IAuthenticationSchemeProvider schemes
    IUserConfirmation<BackOfficeIdentityUser> confirmation
    IEventAggregator eventAggregator
    IOptions<SecuritySettings> securitySettings
    IOptions<BackOfficeAuthenticationTypeSettings> backOfficeAuthenticationTypeSettings
    IRequestCache requestCache

    Properties

    View Source

    AuthenticationType

    Declaration
    protected override string AuthenticationType { get; }
    Property Value
    Type Description
    string
    View Source

    ExternalAuthenticationType

    Declaration
    protected override string ExternalAuthenticationType { get; }
    Property Value
    Type Description
    string
    View Source

    TwoFactorAuthenticationType

    Declaration
    protected override string TwoFactorAuthenticationType { get; }
    Property Value
    Type Description
    string
    View Source

    TwoFactorRememberMeAuthenticationType

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

    Methods

    View Source

    ConfigureExternalAuthenticationProperties(string?, string?, string?)

    Configures the redirect URL and user identifier for the specified external login provider.

    Declaration
    public override AuthenticationProperties ConfigureExternalAuthenticationProperties(string? provider, string? redirectUrl, string? userId = null)
    Parameters
    Type Name Description
    string provider

    The provider to configure.

    string redirectUrl

    The external login URL users should be redirected to during the login flow.

    string userId

    The current user's identifier, which will be used to provide CSRF protection.

    Returns
    Type Description
    AuthenticationProperties

    A configured Microsoft.AspNetCore.Authentication.AuthenticationProperties.

    View Source

    ExternalLoginSignInAsync(ExternalLoginInfo, bool, bool)

    Custom ExternalLoginSignInAsync overload for handling external sign in with auto-linking

    Declaration
    public Task<SignInResult> ExternalLoginSignInAsync(ExternalLoginInfo loginInfo, bool isPersistent, bool bypassTwoFactor = false)
    Parameters
    Type Name Description
    ExternalLoginInfo loginInfo
    bool isPersistent
    bool bypassTwoFactor
    Returns
    Type Description
    Task<SignInResult>
    View Source

    GetExternalAuthenticationSchemesAsync()

    Gets a collection of Microsoft.AspNetCore.Authentication.AuthenticationSchemes for the known external login providers.

    Declaration
    public override Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync()
    Returns
    Type Description
    Task<IEnumerable<AuthenticationScheme>>

    A collection of Microsoft.AspNetCore.Authentication.AuthenticationSchemes for the known external login providers.

    View Source

    HandleSignIn(BackOfficeIdentityUser?, string?, SignInResult)

    Overridden to deal with events/notificiations

    Declaration
    protected override Task<SignInResult> HandleSignIn(BackOfficeIdentityUser? user, string? username, SignInResult result)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    string username
    SignInResult result
    Returns
    Type Description
    Task<SignInResult>
    View Source

    NotifyRequiresTwoFactor(BackOfficeIdentityUser)

    Declaration
    protected void NotifyRequiresTwoFactor(BackOfficeIdentityUser user)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    View Source

    SignInOrTwoFactorAsync(BackOfficeIdentityUser, bool, string?, bool)

    Signs in the specified user if bypassTwoFactor is set to false. Otherwise stores the user for use after a two factor check.

    Declaration
    protected override Task<SignInResult> SignInOrTwoFactorAsync(BackOfficeIdentityUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false)
    Parameters
    Type Name Description
    BackOfficeIdentityUser user
    bool isPersistent

    Flag indicating whether the sign-in cookie should persist after the browser is closed.

    string loginProvider

    The login provider to use. Default is null

    bool bypassTwoFactor

    Flag indicating whether to bypass two factor authentication. Default is false

    Returns
    Type Description
    Task<SignInResult>

    Returns a Microsoft.AspNetCore.Identity.SignInResult

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