Search Results for

    Show / Hide Table of Contents
    View Source

    Class MemberSignInManager

    The sign in manager for members

    Inheritance
    object
    SignInManager<MemberIdentityUser>
    UmbracoSignInManager<MemberIdentityUser>
    Namespace: Umbraco.Cms.Web.Common.Security
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public class MemberSignInManager : UmbracoSignInManager<MemberIdentityUser>, IMemberSignInManager

    Constructors

    View Source

    MemberSignInManager(UserManager<MemberIdentityUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<MemberIdentityUser>, IOptions<IdentityOptions>, ILogger<SignInManager<MemberIdentityUser>>, IAuthenticationSchemeProvider, IUserConfirmation<MemberIdentityUser>, IMemberExternalLoginProviders, IEventAggregator, IOptions<SecuritySettings>, IRequestCache)

    Declaration
    public MemberSignInManager(UserManager<MemberIdentityUser> memberManager, IHttpContextAccessor contextAccessor, IUserClaimsPrincipalFactory<MemberIdentityUser> claimsFactory, IOptions<IdentityOptions> optionsAccessor, ILogger<SignInManager<MemberIdentityUser>> logger, IAuthenticationSchemeProvider schemes, IUserConfirmation<MemberIdentityUser> confirmation, IMemberExternalLoginProviders memberExternalLoginProviders, IEventAggregator eventAggregator, IOptions<SecuritySettings> securitySettings, IRequestCache requestCache)
    Parameters
    Type Name Description
    UserManager<MemberIdentityUser> memberManager
    IHttpContextAccessor contextAccessor
    IUserClaimsPrincipalFactory<MemberIdentityUser> claimsFactory
    IOptions<IdentityOptions> optionsAccessor
    ILogger<SignInManager<MemberIdentityUser>> logger
    IAuthenticationSchemeProvider schemes
    IUserConfirmation<MemberIdentityUser> confirmation
    IMemberExternalLoginProviders memberExternalLoginProviders
    IEventAggregator eventAggregator
    IOptions<SecuritySettings> securitySettings
    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 virtual 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

    GetExternalLoginInfoAsync(string?)

    Gets the external login information for the current login, as an asynchronous operation.

    Declaration
    public override Task<ExternalLoginInfo?> GetExternalLoginInfoAsync(string? expectedXsrf = null)
    Parameters
    Type Name Description
    string expectedXsrf

    Flag indication whether a Cross Site Request Forgery token was expected in the current request.

    Returns
    Type Description
    Task<ExternalLoginInfo>

    The task object representing the asynchronous operation containing the Microsoft.AspNetCore.Identity.ExternalLoginInfo for the sign-in attempt.

    View Source

    HandleFailedLinkingUser(MemberIdentityUser, IdentityResult)

    Declaration
    protected Task<MemberSignInManager.AutoLinkSignInResult> HandleFailedLinkingUser(MemberIdentityUser autoLinkUser, IdentityResult linkResult)
    Parameters
    Type Name Description
    MemberIdentityUser autoLinkUser
    IdentityResult linkResult
    Returns
    Type Description
    Task<MemberSignInManager.AutoLinkSignInResult>
    View Source

    NotifyRequiresTwoFactor(MemberIdentityUser)

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

    SignInOrTwoFactorAsync(MemberIdentityUser, 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(MemberIdentityUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false)
    Parameters
    Type Name Description
    MemberIdentityUser 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