View Source
Class UmbracoSignInManager<TUser>
Abstract sign in manager implementation allowing modifying all defeault authentication schemes
Inheritance
System.Object
Microsoft.AspNetCore.Identity.SignInManager<TUser>
Assembly: Umbraco.Web.Common.dll
Syntax
public abstract class UmbracoSignInManager<TUser> : SignInManager<TUser> where TUser : UmbracoIdentityUser
Type Parameters
Constructors
View Source
UmbracoSignInManager(UserManager<TUser>, IHttpContextAccessor, IUserClaimsPrincipalFactory<TUser>, IOptions<IdentityOptions>, ILogger<SignInManager<TUser>>, IAuthenticationSchemeProvider, IUserConfirmation<TUser>)
Declaration
public UmbracoSignInManager(UserManager<TUser> userManager, IHttpContextAccessor contextAccessor, IUserClaimsPrincipalFactory<TUser> claimsFactory, IOptions<IdentityOptions> optionsAccessor, ILogger<SignInManager<TUser>> logger, IAuthenticationSchemeProvider schemes, IUserConfirmation<TUser> confirmation)
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 |
|
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
ForgetTwoFactorClientAsync()
Declaration
public override Task ForgetTwoFactorClientAsync()
Returns
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
View Source
RememberTwoFactorClientAsync(TUser)
Declaration
public override async Task RememberTwoFactorClientAsync(TUser user)
Parameters
Type |
Name |
Description |
TUser |
user |
|
Returns
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
View Source
SignOutAsync()
Declaration
public override async Task SignOutAsync()
Returns
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> |
|