View Source
Class BackOfficeSignInManager
The sign in manager for back office users
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
Properties
View Source
AllowConcurrentLoginsEnabled
Declaration
protected override bool AllowConcurrentLoginsEnabled { get; }
Property Value
View Source
AuthenticationType
Declaration
protected override string AuthenticationType { get; }
Property Value
View Source
ExternalAuthenticationType
Declaration
protected override string ExternalAuthenticationType { get; }
Property Value
View Source
TwoFactorAuthenticationType
Declaration
protected override string TwoFactorAuthenticationType { get; }
Property Value
View Source
TwoFactorRememberMeAuthenticationType
Declaration
protected override string TwoFactorRememberMeAuthenticationType { get; }
Property Value
Methods
View Source
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()
Declaration
public override Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync()
Returns
| Type |
Description |
| Task<IEnumerable<AuthenticationScheme>> |
|
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
Returns
| Type |
Description |
| Task<SignInResult> |
|
View Source
NotifyRequiresTwoFactor(BackOfficeIdentityUser)
Declaration
protected void NotifyRequiresTwoFactor(BackOfficeIdentityUser user)
Parameters
View Source
SignInOrTwoFactorAsync(BackOfficeIdentityUser, bool, string?, bool)
Declaration
protected override Task<SignInResult> SignInOrTwoFactorAsync(BackOfficeIdentityUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false)
Parameters
Returns
| Type |
Description |
| Task<SignInResult> |
|