5 instantiations of SignInResult
Microsoft.Extensions.Identity.Core (5)
SignInResult.cs (5)
11private static readonly SignInResult _success = new SignInResult { Succeeded = true }; 12private static readonly SignInResult _failed = new SignInResult(); 13private static readonly SignInResult _lockedOut = new SignInResult { IsLockedOut = true }; 14private static readonly SignInResult _notAllowed = new SignInResult { IsNotAllowed = true }; 15private static readonly SignInResult _twoFactorRequired = new SignInResult { RequiresTwoFactor = true };
103 references to SignInResult
Microsoft.AspNetCore.Identity (73)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
99var result = await signInManager.PasswordSignInAsync(login.Email, login.Password, isPersistent, lockoutOnFailure: true);
SignInManager.cs (68)
186var signInResult = success ? SignInResult.Success : SignInResult.Failed; 400/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 402public virtual async Task<SignInResult> PasswordSignInAsync(TUser user, string password, 410var attempt = await CheckPasswordSignInAsync(user, password, lockoutOnFailure); 411var result = attempt.Succeeded 433/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 435public virtual async Task<SignInResult> PasswordSignInAsync(string userName, string password, 442_metrics?.AuthenticateSignIn(typeof(TUser).FullName!, AuthenticationScheme, SignInResult.Failed, SignInType.Password, isPersistent, startTimestamp); 443return SignInResult.Failed; 455/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 457public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, string password, bool lockoutOnFailure) 463var result = await CheckPasswordSignInCoreAsync(user, password, lockoutOnFailure); 475private async Task<SignInResult> CheckPasswordSignInCoreAsync(TUser user, string password, bool lockoutOnFailure) 477var error = await PreSignInCheck(user); 495return SignInResult.Failed; 499return SignInResult.Success; 510return SignInResult.Failed; 518return SignInResult.Failed; 646/// The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 649public virtual async Task<SignInResult> PasskeySignInAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 654var result = await PasskeySignInCoreAsync(credentialJson); 666private async Task<SignInResult> PasskeySignInCoreAsync(string credentialJson) 674return SignInResult.Failed; 687return SignInResult.Failed; 690var error = await PreSignInCheck(assertionResult.User); 701return SignInResult.Failed; 822public virtual async Task<SignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode) 827var result = await TwoFactorRecoveryCodeSignInCoreAsync(recoveryCode); 839private async Task<SignInResult> TwoFactorRecoveryCodeSignInCoreAsync(string recoveryCode) 844return SignInResult.Failed; 854return SignInResult.Failed; 857private async Task<SignInResult> DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) 865return SignInResult.Failed; 892return SignInResult.Success; 902/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 904public virtual async Task<SignInResult> TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient) 909var result = await TwoFactorAuthenticatorSignInCoreAsync(code, isPersistent, rememberClient); 921private async Task<SignInResult> TwoFactorAuthenticatorSignInCoreAsync(string code, bool isPersistent, bool rememberClient) 926return SignInResult.Failed; 930var error = await PreSignInCheck(user); 948return SignInResult.Failed; 956return SignInResult.Failed; 967/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 969public virtual async Task<SignInResult> TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient) 974var result = await TwoFactorSignInCoreAsync(provider, code, isPersistent, rememberClient); 986private async Task<SignInResult> TwoFactorSignInCoreAsync(string provider, string code, bool isPersistent, bool rememberClient) 991return SignInResult.Failed; 995var error = await PreSignInCheck(user); 1012return SignInResult.Failed; 1020return SignInResult.Failed; 1045/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 1047public virtual Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent) 1057/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 1059public virtual async Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1064var result = await ExternalLoginSignInCoreAsync(loginProvider, providerKey, isPersistent, bypassTwoFactor); 1076private async Task<SignInResult> ExternalLoginSignInCoreAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1081return SignInResult.Failed; 1084var error = await PreSignInCheck(user); 1239/// <returns>Returns a <see cref="SignInResult"/></returns> 1240protected virtual async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false) 1261return SignInResult.TwoFactorRequired; 1277return SignInResult.Success; 1327protected virtual Task<SignInResult> LockedOut(TUser user) 1330return Task.FromResult(SignInResult.LockedOut); 1338protected virtual async Task<SignInResult?> PreSignInCheck(TUser user) 1342return SignInResult.NotAllowed;
SignInManagerMetrics.cs (4)
66internal void CheckPasswordSignIn(string userType, SignInResult? result, Exception? exception = null) 83internal void AuthenticateSignIn(string userType, string authenticationScheme, SignInResult? result, SignInType signInType, bool? isPersistent, long startTimestamp, Exception? exception = null) 186private static void AddSignInResult(ref TagList tags, SignInResult? result) 216private static string GetSignInResult(SignInResult result)
Microsoft.AspNetCore.Identity.UI (8)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
141var result = await _signInManager.ExternalLoginSignInAsync(info.LoginProvider, info.ProviderKey, isPersistent: false, bypassTwoFactor: true);
Areas\Identity\Pages\V4\Account\Login.cshtml.cs (1)
130var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: false);
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (1)
126var result = await _signInManager.TwoFactorAuthenticatorSignInAsync(authenticatorCode, rememberMe, Input.RememberMachine);
Areas\Identity\Pages\V4\Account\LoginWithRecoveryCode.cshtml.cs (1)
109var result = await _signInManager.TwoFactorRecoveryCodeSignInAsync(recoveryCode);
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
141var result = await _signInManager.ExternalLoginSignInAsync(info.LoginProvider, info.ProviderKey, isPersistent: false, bypassTwoFactor: true);
Areas\Identity\Pages\V5\Account\Login.cshtml.cs (1)
130var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: false);
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (1)
126var result = await _signInManager.TwoFactorAuthenticatorSignInAsync(authenticatorCode, rememberMe, Input.RememberMachine);
Areas\Identity\Pages\V5\Account\LoginWithRecoveryCode.cshtml.cs (1)
109var result = await _signInManager.TwoFactorRecoveryCodeSignInAsync(recoveryCode);
Microsoft.Extensions.Identity.Core (22)
SignInResult.cs (22)
11private static readonly SignInResult _success = new SignInResult { Succeeded = true }; 12private static readonly SignInResult _failed = new SignInResult(); 13private static readonly SignInResult _lockedOut = new SignInResult { IsLockedOut = true }; 14private static readonly SignInResult _notAllowed = new SignInResult { IsNotAllowed = true }; 15private static readonly SignInResult _twoFactorRequired = new SignInResult { RequiresTwoFactor = true }; 42/// Returns a <see cref="SignInResult"/> that represents a successful sign-in. 44/// <returns>A <see cref="SignInResult"/> that represents a successful sign-in.</returns> 45public static SignInResult Success => _success; 48/// Returns a <see cref="SignInResult"/> that represents a failed sign-in. 50/// <returns>A <see cref="SignInResult"/> that represents a failed sign-in.</returns> 51public static SignInResult Failed => _failed; 54/// Returns a <see cref="SignInResult"/> that represents a sign-in attempt that failed because 57/// <returns>A <see cref="SignInResult"/> that represents sign-in attempt that failed due to the 59public static SignInResult LockedOut => _lockedOut; 62/// Returns a <see cref="SignInResult"/> that represents a sign-in attempt that failed because 65/// <returns>A <see cref="SignInResult"/> that represents sign-in attempt that failed due to the 67public static SignInResult NotAllowed => _notAllowed; 70/// Returns a <see cref="SignInResult"/> that represents a sign-in attempt that needs two-factor 73/// <returns>A <see cref="SignInResult"/> that represents sign-in attempt that needs two-factor 75public static SignInResult TwoFactorRequired => _twoFactorRequired; 78/// Converts the value of the current <see cref="SignInResult"/> object to its equivalent string representation. 80/// <returns>A string representation of value of the current <see cref="SignInResult"/> object.</returns>