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)
191var signInResult = success ? SignInResult.Success : SignInResult.Failed; 405/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 407public virtual async Task<SignInResult> PasswordSignInAsync(TUser user, string password, 415var attempt = await CheckPasswordSignInAsync(user, password, lockoutOnFailure); 416var result = attempt.Succeeded 438/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 440public virtual async Task<SignInResult> PasswordSignInAsync(string userName, string password, 447_metrics?.AuthenticateSignIn(typeof(TUser).FullName!, AuthenticationScheme, SignInResult.Failed, SignInType.Password, isPersistent, startTimestamp); 448return SignInResult.Failed; 460/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 462public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, string password, bool lockoutOnFailure) 468var result = await CheckPasswordSignInCoreAsync(user, password, lockoutOnFailure); 480private async Task<SignInResult> CheckPasswordSignInCoreAsync(TUser user, string password, bool lockoutOnFailure) 482var error = await PreSignInCheck(user); 500return SignInResult.Failed; 504return SignInResult.Success; 515return SignInResult.Failed; 523return SignInResult.Failed; 826/// The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 829public virtual async Task<SignInResult> PasskeySignInAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 834var result = await PasskeySignInCoreAsync(credentialJson); 846private async Task<SignInResult> PasskeySignInCoreAsync(string credentialJson) 854return SignInResult.Failed; 867return SignInResult.Failed; 870var error = await PreSignInCheck(assertionResult.User); 881return SignInResult.Failed; 1002public virtual async Task<SignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode) 1007var result = await TwoFactorRecoveryCodeSignInCoreAsync(recoveryCode); 1019private async Task<SignInResult> TwoFactorRecoveryCodeSignInCoreAsync(string recoveryCode) 1024return SignInResult.Failed; 1034return SignInResult.Failed; 1037private async Task<SignInResult> DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) 1045return SignInResult.Failed; 1072return SignInResult.Success; 1082/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 1084public virtual async Task<SignInResult> TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient) 1089var result = await TwoFactorAuthenticatorSignInCoreAsync(code, isPersistent, rememberClient); 1101private async Task<SignInResult> TwoFactorAuthenticatorSignInCoreAsync(string code, bool isPersistent, bool rememberClient) 1106return SignInResult.Failed; 1110var error = await PreSignInCheck(user); 1128return SignInResult.Failed; 1136return SignInResult.Failed; 1147/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 1149public virtual async Task<SignInResult> TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient) 1154var result = await TwoFactorSignInCoreAsync(provider, code, isPersistent, rememberClient); 1166private async Task<SignInResult> TwoFactorSignInCoreAsync(string provider, string code, bool isPersistent, bool rememberClient) 1171return SignInResult.Failed; 1175var error = await PreSignInCheck(user); 1192return SignInResult.Failed; 1200return SignInResult.Failed; 1225/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 1227public virtual Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent) 1237/// <returns>The task object representing the asynchronous operation containing the <see cref="SignInResult"/> 1239public virtual async Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1244var result = await ExternalLoginSignInCoreAsync(loginProvider, providerKey, isPersistent, bypassTwoFactor); 1256private async Task<SignInResult> ExternalLoginSignInCoreAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1261return SignInResult.Failed; 1264var error = await PreSignInCheck(user); 1425/// <returns>Returns a <see cref="SignInResult"/></returns> 1426protected virtual async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false) 1446return SignInResult.TwoFactorRequired; 1462return SignInResult.Success; 1508protected virtual Task<SignInResult> LockedOut(TUser user) 1511return Task.FromResult(SignInResult.LockedOut); 1519protected virtual async Task<SignInResult?> PreSignInCheck(TUser user) 1523return 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>