Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoSignInManager<TUser>

    Abstract sign in manager implementation allowing modifying all default authentication schemes.

    Inheritance
    System.Object
    Microsoft.AspNetCore.Identity.SignInManager<TUser>
    Namespace: Umbraco.Cms.Web.Common.Security
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public abstract class UmbracoSignInManager<TUser> : SignInManager<TUser> where TUser : UmbracoIdentityUser
    Type Parameters
    Name Description
    TUser

    Constructors

    View Source

    UmbracoSignInManager(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider, IUserConfirmation<TUser>, IOptions<SecuritySettings>)

    Declaration
    public UmbracoSignInManager(UserManager<TUser> userManager, IHttpContextAccessor contextAccessor, IUserClaimsPrincipalFactory<TUser> claimsFactory, IOptions<IdentityOptions> optionsAccessor, ILogger<SignInManager<TUser>> logger, IAuthenticationSchemeProvider schemes, IUserConfirmation<TUser> confirmation, IOptions<SecuritySettings> securitySettingsOptions)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Identity.UserManager<TUser> userManager
    Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor
    Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser> claimsFactory
    Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> optionsAccessor
    Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<TUser>> logger
    Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes
    Microsoft.AspNetCore.Identity.IUserConfirmation<TUser> confirmation
    Microsoft.Extensions.Options.IOptions<SecuritySettings> securitySettingsOptions
    View Source

    UmbracoSignInManager(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider, IUserConfirmation<TUser>, IOptions<SecuritySettings>, IRequestCache)

    Declaration
    public UmbracoSignInManager(UserManager<TUser> userManager, IHttpContextAccessor contextAccessor, IUserClaimsPrincipalFactory<TUser> claimsFactory, IOptions<IdentityOptions> optionsAccessor, ILogger<SignInManager<TUser>> logger, IAuthenticationSchemeProvider schemes, IUserConfirmation<TUser> confirmation, IOptions<SecuritySettings> securitySettingsOptions, IRequestCache requestCache)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Identity.UserManager<TUser> userManager
    Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor
    Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser> claimsFactory
    Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> optionsAccessor
    Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<TUser>> logger
    Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes
    Microsoft.AspNetCore.Identity.IUserConfirmation<TUser> confirmation
    Microsoft.Extensions.Options.IOptions<SecuritySettings> securitySettingsOptions
    IRequestCache requestCache

    Fields

    View Source

    UmbracoSignInMgrLoginProviderKey

    Declaration
    protected const string UmbracoSignInMgrLoginProviderKey = "LoginProvider"
    Field Value
    Type Description
    System.String
    View Source

    UmbracoSignInMgrXsrfKey

    Declaration
    protected const string UmbracoSignInMgrXsrfKey = "XsrfId"
    Field Value
    Type Description
    System.String

    Properties

    View Source

    AuthenticationType

    Declaration
    protected abstract string AuthenticationType { get; }
    Property Value
    Type Description
    System.String
    View Source

    ExternalAuthenticationType

    Declaration
    protected abstract string ExternalAuthenticationType { get; }
    Property Value
    Type Description
    System.String
    View Source

    TwoFactorAuthenticationType

    Declaration
    protected abstract string TwoFactorAuthenticationType { get; }
    Property Value
    Type Description
    System.String
    View Source

    TwoFactorRememberMeAuthenticationType

    Declaration
    protected abstract string TwoFactorRememberMeAuthenticationType { get; }
    Property Value
    Type Description
    System.String

    Methods

    View Source

    CreateUserPrincipalAsync(Guid)

    Declaration
    public virtual async Task<ClaimsPrincipal> CreateUserPrincipalAsync(Guid userKey)
    Parameters
    Type Name Description
    Guid userKey
    Returns
    Type Description
    Task<System.Security.Claims.ClaimsPrincipal>
    View Source

    ForgetTwoFactorClientAsync()

    Declaration
    public override Task ForgetTwoFactorClientAsync()
    Returns
    Type Description
    Task
    View Source

    GetExternalLoginInfoAsync(String)

    Declaration
    public override async Task<ExternalLoginInfo> GetExternalLoginInfoAsync(string expectedXsrf = null)
    Parameters
    Type Name Description
    System.String expectedXsrf
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Identity.ExternalLoginInfo>
    View Source

    GetTwoFactorAuthenticationUserAsync()

    Declaration
    public override async Task<TUser> GetTwoFactorAuthenticationUserAsync()
    Returns
    Type Description
    Task<TUser>
    View Source

    HandleSignIn(TUser, String, SignInResult)

    Called on any login attempt to update the AccessFailedCount and to raise events

    Declaration
    protected virtual async Task<SignInResult> HandleSignIn(TUser user, string username, SignInResult result)
    Parameters
    Type Name Description
    TUser user
    System.String username
    Microsoft.AspNetCore.Identity.SignInResult result
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Identity.SignInResult>
    View Source

    IsSignedIn(ClaimsPrincipal)

    Declaration
    public override bool IsSignedIn(ClaimsPrincipal principal)
    Parameters
    Type Name Description
    System.Security.Claims.ClaimsPrincipal principal
    Returns
    Type Description
    System.Boolean
    View Source

    IsTwoFactorClientRememberedAsync(TUser)

    Declaration
    public override async Task<bool> IsTwoFactorClientRememberedAsync(TUser user)
    Parameters
    Type Name Description
    TUser user
    Returns
    Type Description
    Task<System.Boolean>
    View Source

    PasswordSignInAsync(TUser, String, Boolean, Boolean)

    Declaration
    public override async Task<SignInResult> PasswordSignInAsync(TUser user, string password, bool isPersistent, bool lockoutOnFailure)
    Parameters
    Type Name Description
    TUser user
    System.String password
    System.Boolean isPersistent
    System.Boolean lockoutOnFailure
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Identity.SignInResult>
    View Source

    PasswordSignInAsync(String, String, Boolean, Boolean)

    Declaration
    public override async Task<SignInResult> PasswordSignInAsync(string userName, string password, bool isPersistent, bool lockoutOnFailure)
    Parameters
    Type Name Description
    System.String userName
    System.String password
    System.Boolean isPersistent
    System.Boolean lockoutOnFailure
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Identity.SignInResult>
    View Source

    RefreshSignInAsync(TUser)

    Declaration
    public override async Task RefreshSignInAsync(TUser user)
    Parameters
    Type Name Description
    TUser user
    Returns
    Type Description
    Task
    View Source

    RememberTwoFactorClientAsync(TUser)

    Declaration
    public override async Task RememberTwoFactorClientAsync(TUser user)
    Parameters
    Type Name Description
    TUser user
    Returns
    Type Description
    Task
    View Source

    SignInOrTwoFactorAsync(TUser, Boolean, String, Boolean)

    Declaration
    protected override async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, bool isPersistent, string loginProvider = null, bool bypassTwoFactor = false)
    Parameters
    Type Name Description
    TUser user
    System.Boolean isPersistent
    System.String loginProvider
    System.Boolean bypassTwoFactor
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Identity.SignInResult>
    View Source

    SignInWithClaimsAsync(TUser, AuthenticationProperties, IEnumerable<Claim>)

    Declaration
    public override async Task SignInWithClaimsAsync(TUser user, AuthenticationProperties authenticationProperties, IEnumerable<Claim> additionalClaims)
    Parameters
    Type Name Description
    TUser user
    Microsoft.AspNetCore.Authentication.AuthenticationProperties authenticationProperties
    IEnumerable<System.Security.Claims.Claim> additionalClaims
    Returns
    Type Description
    Task
    View Source

    SignOutAsync()

    Declaration
    public override async Task SignOutAsync()
    Returns
    Type Description
    Task
    View Source

    TwoFactorRecoveryCodeSignInAsync(String)

    Declaration
    public override async Task<SignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode)
    Parameters
    Type Name Description
    System.String recoveryCode
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Identity.SignInResult>
    View Source

    TwoFactorSignInAsync(String, String, Boolean, Boolean)

    Declaration
    public override async Task<SignInResult> TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient)
    Parameters
    Type Name Description
    System.String provider
    System.String code
    System.Boolean isPersistent
    System.Boolean rememberClient
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Identity.SignInResult>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • UmbracoSignInManager(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider, IUserConfirmation<TUser>, IOptions<SecuritySettings>)
      • UmbracoSignInManager(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider, IUserConfirmation<TUser>, IOptions<SecuritySettings>, IRequestCache)
    • Fields
      • UmbracoSignInMgrLoginProviderKey
      • UmbracoSignInMgrXsrfKey
    • Properties
      • AuthenticationType
      • ExternalAuthenticationType
      • TwoFactorAuthenticationType
      • TwoFactorRememberMeAuthenticationType
    • Methods
      • CreateUserPrincipalAsync(Guid)
      • ForgetTwoFactorClientAsync()
      • GetExternalLoginInfoAsync(String)
      • GetTwoFactorAuthenticationUserAsync()
      • HandleSignIn(TUser, String, SignInResult)
      • IsSignedIn(ClaimsPrincipal)
      • IsTwoFactorClientRememberedAsync(TUser)
      • PasswordSignInAsync(TUser, String, Boolean, Boolean)
      • PasswordSignInAsync(String, String, Boolean, Boolean)
      • RefreshSignInAsync(TUser)
      • RememberTwoFactorClientAsync(TUser)
      • SignInOrTwoFactorAsync(TUser, Boolean, String, Boolean)
      • SignInWithClaimsAsync(TUser, AuthenticationProperties, IEnumerable<Claim>)
      • SignOutAsync()
      • TwoFactorRecoveryCodeSignInAsync(String)
      • TwoFactorSignInAsync(String, String, Boolean, Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX