4 instantiations of IdentityResult
Microsoft.AspNetCore.Identity.Test (1)
IdentityResultTest.cs (1)
11var result = new IdentityResult();
Microsoft.Extensions.Identity.Core (3)
IdentityResult.cs (3)
15private static readonly IdentityResult _success = new IdentityResult { Succeeded = true }; 44var result = new IdentityResult { Succeeded = false }; 54var result = new IdentityResult { Succeeded = false };
513 references to IdentityResult
Identity.DefaultUI.WebSite (6)
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (6)
221public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 224return Task.FromResult(IdentityResult.Success); 227public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 230return Task.FromResult(IdentityResult.Success); 253public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 260return Task.FromResult(IdentityResult.Success);
Identity.ExternalClaims (11)
Pages\Account\ConfirmEmail.cshtml.cs (1)
37var result = await _userManager.ConfirmEmailAsync(user, code);
Pages\Account\ExternalLogin.cshtml.cs (1)
120var result = await _userManager.CreateAsync(user);
Pages\Account\Manage\ChangePassword.cshtml.cs (1)
88var changePasswordResult = await _userManager.ChangePasswordAsync(user, Input.OldPassword, Input.NewPassword);
Pages\Account\Manage\Disable2fa.cshtml.cs (1)
53var disable2faResult = await _userManager.SetTwoFactorEnabledAsync(user, false);
Pages\Account\Manage\ExternalLogins.cshtml.cs (2)
62var result = await _userManager.RemoveLoginAsync(user, loginProvider, providerKey); 98var result = await _userManager.AddLoginAsync(user, info);
Pages\Account\Manage\Index.cshtml.cs (2)
91var setEmailResult = await _userManager.SetEmailAsync(user, Input.Email); 100var setPhoneResult = await _userManager.SetPhoneNumberAsync(user, Input.PhoneNumber);
Pages\Account\Manage\SetPassword.cshtml.cs (1)
80var addPasswordResult = await _userManager.AddPasswordAsync(user, Input.NewPassword);
Pages\Account\Register.cshtml.cs (1)
72var result = await _userManager.CreateAsync(user, Input.Password);
Pages\Account\ResetPassword.cshtml.cs (1)
77var result = await _userManager.ResetPasswordAsync(user, Input.Code, Input.Password);
IdentitySample.DefaultUI (3)
Areas\Identity\Pages\Account\Manage\Index.cshtml.cs (2)
92var updateProfileResult = await _userManager.UpdateAsync(user); 100var setPhoneResult = await _userManager.SetPhoneNumberAsync(user, Input.PhoneNumber);
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
90var result = await _userManager.CreateAsync(user, Input.Password);
IdentitySample.Mvc (12)
Controllers\AccountController.cs (5)
107var result = await _userManager.CreateAsync(user, model.Password); 212var result = await _userManager.CreateAsync(user); 248var result = await _userManager.ConfirmEmailAsync(user, code); 325var result = await _userManager.ResetPasswordAsync(user, model.Code, model.Password); 537private void AddErrors(IdentityResult result)
Controllers\ManageController.cs (7)
73var result = await _userManager.RemoveLoginAsync(user, account.LoginProvider, account.ProviderKey); 193var result = await _userManager.ChangePhoneNumberAsync(user, model.PhoneNumber, model.Code); 214var result = await _userManager.SetPhoneNumberAsync(user, null); 245var result = await _userManager.ChangePasswordAsync(user, model.OldPassword, model.NewPassword); 280var result = await _userManager.AddPasswordAsync(user, model.NewPassword); 344var result = await _userManager.AddLoginAsync(user, info); 351private void AddErrors(IdentityResult result)
IdentitySample.PasskeyConformance (8)
InMemoryUserStore.cs (6)
19public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken) 22return Task.FromResult(IdentityResult.Success); 25public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken) 31return Task.FromResult(IdentityResult.Success); 67public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken) 70return Task.FromResult(IdentityResult.Success);
Program.cs (2)
120var createUserResult = await userManager.CreateAsync(user); 128var updateResult = await userManager.UpdateAsync(user).ConfigureAwait(false);
IdentitySample.PasskeyUI (6)
InMemoryUserStore.cs (6)
19public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken) 22return Task.FromResult(IdentityResult.Success); 25public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken) 31return Task.FromResult(IdentityResult.Success); 67public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken) 70return Task.FromResult(IdentityResult.Success);
Microsoft.AspNetCore.Identity (35)
IdentityApiEndpointRouteBuilderExtensions.cs (9)
73return CreateValidationProblem(IdentityResult.Failed(userManager.ErrorDescriber.InvalidEmail(email))); 79var result = await userManager.CreateAsync(user, registration.Password); 161IdentityResult result; 236return CreateValidationProblem(IdentityResult.Failed(userManager.ErrorDescriber.InvalidToken())); 239IdentityResult result; 247result = IdentityResult.Failed(userManager.ErrorDescriber.InvalidToken()); 359return CreateValidationProblem(IdentityResult.Failed(userManager.ErrorDescriber.InvalidEmail(infoRequest.NewEmail))); 370var changePasswordResult = await userManager.ChangePasswordAsync(user, infoRequest.OldPassword, infoRequest.NewPassword); 429private static ValidationProblem CreateValidationProblem(IdentityResult result)
SignInManager.cs (26)
480var resetLockoutResult = await ResetLockoutWithResult(user); 497var incrementLockoutResult = await UserManager.AccessFailedAsync(user) ?? IdentityResult.Success; 669var setPasskeyResult = await UserManager.AddOrUpdatePasskeyAsync(assertionResult.User, assertionResult.Passkey); 818var result = await UserManager.RedeemTwoFactorRecoveryCodeAsync(twoFactorInfo.User, recoveryCode); 830var resetLockoutResult = await ResetLockoutWithResult(user); 914var incrementLockoutResult = await UserManager.AccessFailedAsync(user) ?? IdentityResult.Success; 978var incrementLockoutResult = await UserManager.AccessFailedAsync(user) ?? IdentityResult.Success; 1116/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the operation.</returns> 1117public virtual async Task<IdentityResult> UpdateExternalAuthenticationTokensAsync(ExternalLoginInfo externalLogin) 1126return IdentityResult.Failed(); 1131var result = await UserManager.SetAuthenticationTokenAsync(user, externalLogin.LoginProvider, token.Name, token.Value); 1139return IdentityResult.Success; 1326/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the operation.</returns> 1332var result = await UserManager.ResetAccessFailedCountAsync(user) ?? IdentityResult.Success; 1341private async Task<IdentityResult> ResetLockoutWithResult(TUser user) 1348return IdentityResult.Success; 1351return await UserManager.ResetAccessFailedCountAsync(user) ?? IdentityResult.Success; 1358if (resetLockoutTask is Task<IdentityResult> resultTask) 1360return await resultTask ?? IdentityResult.Success; 1364return IdentityResult.Success; 1374internal IdentityResultException(IdentityResult result) : base() 1379internal IdentityResult IdentityResult { get; set; }
Microsoft.AspNetCore.Identity.EntityFrameworkCore (33)
RoleStore.cs (11)
129/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 130public virtual async Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 137return IdentityResult.Success; 145/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 146public virtual async Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 160return IdentityResult.Failed(ErrorDescriber.ConcurrencyFailure()); 162return IdentityResult.Success; 170/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 171public virtual async Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 183return IdentityResult.Failed(ErrorDescriber.ConcurrencyFailure()); 185return IdentityResult.Success;
UserOnlyStore.cs (11)
191/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the creation operation.</returns> 192public override async Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 199return IdentityResult.Success; 207/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the update operation.</returns> 208public override async Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 223return IdentityResult.Failed(ErrorDescriber.ConcurrencyFailure()); 225return IdentityResult.Success; 233/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the update operation.</returns> 234public override async Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 247return IdentityResult.Failed(ErrorDescriber.ConcurrencyFailure()); 249return IdentityResult.Success;
UserStore.cs (11)
195/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the creation operation.</returns> 196public override async Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 203return IdentityResult.Success; 211/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the update operation.</returns> 212public override async Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 227return IdentityResult.Failed(ErrorDescriber.ConcurrencyFailure()); 229return IdentityResult.Success; 237/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the update operation.</returns> 238public override async Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 251return IdentityResult.Failed(ErrorDescriber.ConcurrencyFailure()); 253return IdentityResult.Success;
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
SqlStoreTestBase.cs (1)
315var result = await manager.CreateAsync(user);
src\Identity\test\Shared\MockHelpers.cs (1)
73.Returns(Task.FromResult(IdentityResult.Success)).Verifiable();
Microsoft.AspNetCore.Identity.InMemory.Test (16)
FunctionalTest.cs (3)
313var result = await userManager.CreateAsync(user, TestPassword); 326var result = await userManager.CreateAsync(new PocoUser("simple"), "aaaaaa"); 332var result = await userManager.UpdateSecurityStampAsync(user);
InMemoryStore.cs (6)
72public Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 75return Task.FromResult(IdentityResult.Success); 78public Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 85return Task.FromResult(IdentityResult.Success); 104public Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 107return Task.FromResult(IdentityResult.Success);
InMemoryUserStore.cs (6)
221public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 224return Task.FromResult(IdentityResult.Success); 227public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 230return Task.FromResult(IdentityResult.Success); 253public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 260return Task.FromResult(IdentityResult.Success);
src\Identity\test\Shared\MockHelpers.cs (1)
73.Returns(Task.FromResult(IdentityResult.Success)).Verifiable();
Microsoft.AspNetCore.Identity.Specification.Tests (25)
IdentityResultAssert.cs (4)
19public static void IsSuccess(IdentityResult result) 28public static void IsFailure(IdentityResult result) 37public static void IsFailure(IdentityResult result, string error) 47public static void IsFailure(IdentityResult result, IdentityError error = null)
IdentitySpecificationTestBase.cs (8)
143public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 145return Task.FromResult(IdentityResult.Failed(ErrorMessage)); 148public Task<IdentityResult> ValidateAsync(RoleManager<TRole> manager, TRole role) 150return Task.FromResult(IdentityResult.Failed(ErrorMessage)); 153public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user) 155return Task.FromResult(IdentityResult.Failed(ErrorMessage)); 187var result = await manager.CreateAsync(role); 486var result = await userMgr.RemoveFromRoleAsync(user, roleName);
UserManagerSpecificationTests.cs (13)
145public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 147return Task.FromResult(IdentityResult.Failed(ErrorMessage)); 150public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user) 152return Task.FromResult(IdentityResult.Failed(ErrorMessage)); 159public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 161return Task.FromResult(IdentityResult.Failed()); 164public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user) 166return Task.FromResult(IdentityResult.Failed()); 392var result = await manager.CreateAsync(user); 458var result = await manager.AddPasswordAsync(user, "pwd"); 637var result = await manager.CreateAsync(user); 827var result = await manager.ChangePasswordAsync(user, "bogus", "newpassword"); 904var result = await manager.AddLoginAsync(user, login);
Microsoft.AspNetCore.Identity.Test (111)
IdentityBuilderTest.cs (9)
273public Task<IdentityResult> CreateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 278public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 283public Task<IdentityResult> DeleteAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 288public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 358public Task<IdentityResult> UpdateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 363public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 368public Task<IdentityResult> ValidateAsync(RoleManager<PocoRole> manager, PocoRole role) 373public Task<IdentityResult> ValidateAsync(UserManager<PocoUser> manager, PocoUser user) 378public Task<IdentityResult> ValidateAsync(UserManager<PocoUser> manager, PocoUser user, string password)
IdentityResultTest.cs (3)
11var result = new IdentityResult(); 19var result = IdentityResult.Failed();
NoopRoleStore.cs (6)
8public Task<IdentityResult> CreateAsync(PocoRole user, CancellationToken cancellationToken = default(CancellationToken)) 10return Task.FromResult(IdentityResult.Success); 13public Task<IdentityResult> UpdateAsync(PocoRole user, CancellationToken cancellationToken = default(CancellationToken)) 15return Task.FromResult(IdentityResult.Success); 42public Task<IdentityResult> DeleteAsync(PocoRole user, CancellationToken cancellationToken = default(CancellationToken)) 44return Task.FromResult(IdentityResult.Success);
NoopUserStore.cs (6)
23public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 25return Task.FromResult(IdentityResult.Success); 28public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 30return Task.FromResult(IdentityResult.Success); 47public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 49return Task.FromResult(IdentityResult.Success);
PasswordValidatorTest.cs (1)
168var result = await valid.ValidateAsync(manager, null, input);
RoleManagerTest.cs (7)
17store.Setup(s => s.CreateAsync(role, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 23var result = await roleManager.CreateAsync(role); 37store.Setup(s => s.UpdateAsync(role, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 43var result = await roleManager.UpdateAsync(role); 153public Task<IdentityResult> CreateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 158public Task<IdentityResult> UpdateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 163public Task<IdentityResult> DeleteAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken))
RoleValidatorTest.cs (1)
32var result = await validator.ValidateAsync(manager, user);
SignInManagerTest.cs (19)
220manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Success).Verifiable(); 269manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Success).Verifiable(); 292manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Success).Verifiable(); 452.Returns(Task.FromResult(IdentityResult.Success)) 549manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Success).Verifiable(); 626return Task.FromResult(IdentityResult.Success); 706manager.Setup(m => m.RedeemTwoFactorRecoveryCodeAsync(user, bypassCode)).ReturnsAsync(IdentityResult.Success).Verifiable(); 709manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Success).Verifiable(); 960manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Success).Verifiable(); 1019return Task.FromResult(IdentityResult.Success); 1271return Task.FromResult(IdentityResult.Success); 1298return Task.FromResult(IdentityResult.Success); 1531manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Failed()).Verifiable(); 1554manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync((IdentityResult)null).Verifiable(); 1582manager.Setup(m => m.ResetAccessFailedCountAsync(user)).ReturnsAsync(IdentityResult.Failed()).Verifiable(); 1602new object[] { IdentityResult.Success, SignInResult.LockedOut }, 1604new object[] { IdentityResult.Failed(), SignInResult.Failed }, 1609public async Task CheckPasswordSignInLockedOutResultIsDependentOnTheAccessFailedAsyncResult(IdentityResult accessFailedResult, SignInResult expectedSignInResult) 1635public async Task TwoFactorSignInLockedOutResultIsDependentOnTheAccessFailedAsyncResult(IdentityResult accessFailedResult, SignInResult expectedSignInResult)
src\Identity\test\Shared\MockHelpers.cs (1)
73.Returns(Task.FromResult(IdentityResult.Success)).Verifiable();
UserManagerTest.cs (55)
72store.Setup(s => s.CreateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 78var result = await userManager.CreateAsync(user); 91store.Setup(s => s.CreateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 97var result = await userManager.CreateAsync(user); 111store.Setup(s => s.CreateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 119var result = await userManager.CreateAsync(user); 135store.Setup(s => s.DeleteAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 139var result = await userManager.DeleteAsync(user); 162store.Setup(s => s.DeleteAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Failed(new IdentityErrorDescriber().ConcurrencyFailure())).Verifiable(); 166var result = await userManager.DeleteAsync(user); 190store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 194var result = await userManager.UpdateAsync(user); 212store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 216var result = await userManager.UpdateAsync(user); 233store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).Returns(Task.FromResult(IdentityResult.Success)).Verifiable(); 237var result = await userManager.SetUserNameAsync(user, "foo"); 393store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 406var result = await userManager.AddToRolesAsync(user, roles); 431store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 445var result = await userManager.AddToRolesAsync(user, roles); 470var result = await userManager.AddToRolesAsync(user, roles); 494store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 507var result = await userManager.RemoveFromRolesAsync(user, roles); 534var result = await userManager.RemoveFromRolesAsync(user, roles); 551store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 555var result = await userManager.AddClaimsAsync(user, claims); 575store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 579var result = await userManager.AddClaimAsync(user, claim); 607store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).Returns(Task.FromResult(IdentityResult.Success)).Verifiable(); 611var result = await userManager.ReplaceClaimAsync(user, claim, newClaim); 644store.Setup(x => x.UpdateAsync(It.IsAny<PocoUser>(), It.IsAny<CancellationToken>())).Returns(Task.FromResult(IdentityResult.Success)); 739store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 743var result = await userManager.RemoveClaimsAsync(user, claims); 770store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 774var result = await userManager.RemoveClaimAsync(user, claim); 796store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 800var result = await userManager.AddOrUpdatePasskeyAsync(user, passkey); 852store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 856var result = await userManager.RemovePasskeyAsync(user, credentialId); 1160public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken) 1165public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken) 1210public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken) 1538private IdentityResult badResult; 1544badResult = IdentityResult.Failed(ErrorMessage); 1548badResult = IdentityResult.Failed(); 1552public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 1677public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1679return Task.FromResult(IdentityResult.Success); 1682public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1684return Task.FromResult(IdentityResult.Success); 1687public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1689return Task.FromResult(IdentityResult.Success); 2089Task<IdentityResult> IUserStore<PocoUser>.CreateAsync(PocoUser user, CancellationToken cancellationToken) 2094Task<IdentityResult> IUserStore<PocoUser>.UpdateAsync(PocoUser user, CancellationToken cancellationToken) 2099Task<IdentityResult> IUserStore<PocoUser>.DeleteAsync(PocoUser user, CancellationToken cancellationToken)
UserValidatorTest.cs (3)
32var result = await validator.ValidateAsync(manager, user); 54var result = await validator.ValidateAsync(manager, user); 82var result = await validator.ValidateAsync(manager, user);
Microsoft.AspNetCore.Identity.UI (26)
Areas\Identity\Pages\V4\Account\ConfirmEmail.cshtml.cs (1)
57var result = await _userManager.ConfirmEmailAsync(user, code);
Areas\Identity\Pages\V4\Account\ConfirmEmailChange.cshtml.cs (2)
59var result = await _userManager.ChangeEmailAsync(user, email, code); 68var setUserNameResult = await _userManager.SetUserNameAsync(user, email);
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
188var result = await _userManager.CreateAsync(user);
Areas\Identity\Pages\V4\Account\Manage\ChangePassword.cshtml.cs (1)
126var changePasswordResult = await _userManager.ChangePasswordAsync(user, Input.OldPassword, Input.NewPassword);
Areas\Identity\Pages\V4\Account\Manage\DeletePersonalData.cshtml.cs (1)
105var result = await _userManager.DeleteAsync(user);
Areas\Identity\Pages\V4\Account\Manage\Disable2fa.cshtml.cs (1)
74var disable2faResult = await _userManager.SetTwoFactorEnabledAsync(user, false);
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (2)
115var result = await _userManager.RemoveLoginAsync(user, loginProvider, providerKey); 153var result = await _userManager.AddLoginAsync(user, info);
Areas\Identity\Pages\V4\Account\Manage\Index.cshtml.cs (1)
120var setPhoneResult = await _userManager.SetPhoneNumberAsync(user, Input.PhoneNumber);
Areas\Identity\Pages\V4\Account\Manage\SetPassword.cshtml.cs (1)
114var addPasswordResult = await _userManager.AddPasswordAsync(user, Input.NewPassword);
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
133var result = await _userManager.CreateAsync(user, Input.Password);
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (1)
120var result = await _userManager.ResetPasswordAsync(user, Input.Code, Input.Password);
Areas\Identity\Pages\V5\Account\ConfirmEmail.cshtml.cs (1)
57var result = await _userManager.ConfirmEmailAsync(user, code);
Areas\Identity\Pages\V5\Account\ConfirmEmailChange.cshtml.cs (2)
59var result = await _userManager.ChangeEmailAsync(user, email, code); 68var setUserNameResult = await _userManager.SetUserNameAsync(user, email);
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
188var result = await _userManager.CreateAsync(user);
Areas\Identity\Pages\V5\Account\Manage\ChangePassword.cshtml.cs (1)
126var changePasswordResult = await _userManager.ChangePasswordAsync(user, Input.OldPassword, Input.NewPassword);
Areas\Identity\Pages\V5\Account\Manage\DeletePersonalData.cshtml.cs (1)
105var result = await _userManager.DeleteAsync(user);
Areas\Identity\Pages\V5\Account\Manage\Disable2fa.cshtml.cs (1)
74var disable2faResult = await _userManager.SetTwoFactorEnabledAsync(user, false);
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (2)
115var result = await _userManager.RemoveLoginAsync(user, loginProvider, providerKey); 153var result = await _userManager.AddLoginAsync(user, info);
Areas\Identity\Pages\V5\Account\Manage\Index.cshtml.cs (1)
120var setPhoneResult = await _userManager.SetPhoneNumberAsync(user, Input.PhoneNumber);
Areas\Identity\Pages\V5\Account\Manage\SetPassword.cshtml.cs (1)
114var addPasswordResult = await _userManager.AddPasswordAsync(user, Input.NewPassword);
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
133var result = await _userManager.CreateAsync(user, Input.Password);
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (1)
120var result = await _userManager.ResetPasswordAsync(user, Input.Code, Input.Password);
Microsoft.Extensions.Identity.Core (207)
DefaultUserConfirmation.cs (1)
19/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the confirmation operation.</returns>
IdentityResult.cs (12)
15private static readonly IdentityResult _success = new IdentityResult { Succeeded = true }; 32/// Returns an <see cref="IdentityResult"/> indicating a successful identity operation. 34/// <returns>An <see cref="IdentityResult"/> indicating a successful operation.</returns> 35public static IdentityResult Success => _success; 38/// Creates an <see cref="IdentityResult"/> indicating a failed identity operation, with a list of <paramref name="errors"/> if applicable. 41/// <returns>An <see cref="IdentityResult"/> indicating a failed identity operation, with a list of <paramref name="errors"/> if applicable.</returns> 42public static IdentityResult Failed(params IdentityError[] errors) 44var result = new IdentityResult { Succeeded = false }; 52internal static IdentityResult Failed(List<IdentityError>? errors) 54var result = new IdentityResult { Succeeded = false }; 63/// Converts the value of the current <see cref="IdentityResult"/> object to its equivalent string representation. 65/// <returns>A string representation of the current <see cref="IdentityResult"/> object.</returns>
IPasswordValidator.cs (1)
21Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string? password);
IRoleStore.cs (6)
21/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 22Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken); 29/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 30Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken); 37/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 38Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken);
IRoleValidator.cs (2)
19/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous validation.</returns> 20Task<IdentityResult> ValidateAsync(RoleManager<TRole> manager, TRole role);
IUserStore.cs (6)
63/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the creation operation.</returns> 64Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken); 71/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the update operation.</returns> 72Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken); 79/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the delete operation.</returns> 80Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken);
IUserValidator.cs (2)
19/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the validation operation.</returns> 20Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user);
PasswordValidator.cs (3)
40public virtual Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string? password) 78? IdentityResult.Failed(errors) 79: IdentityResult.Success);
RoleManager.cs (21)
155public virtual async Task<IdentityResult> CreateAsync(TRole role) 159var result = await ValidateRoleAsync(role).ConfigureAwait(false); 187/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> for the update. 189public virtual Task<IdentityResult> UpdateAsync(TRole role) 202/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> for the delete. 204public virtual Task<IdentityResult> DeleteAsync(TRole role) 272/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 275public virtual async Task<IdentityResult> SetRoleNameAsync(TRole role, string? name) 281return IdentityResult.Success; 320/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 323public virtual async Task<IdentityResult> AddClaimAsync(TRole role, Claim claim) 340/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 343public virtual async Task<IdentityResult> RemoveClaimAsync(TRole role, Claim claim) 392/// Should return <see cref="IdentityResult.Success"/> if validation is successful. This is 396/// <returns>A <see cref="IdentityResult"/> representing whether validation was successful.</returns> 397protected virtual async Task<IdentityResult> ValidateRoleAsync(TRole role) 402var result = await v.ValidateAsync(this, role).ConfigureAwait(false); 415return IdentityResult.Failed(errors); 417return IdentityResult.Success; 425protected virtual async Task<IdentityResult> UpdateRoleAsync(TRole role) 427var result = await ValidateRoleAsync(role).ConfigureAwait(false);
RoleValidator.cs (4)
33/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous validation.</returns> 34public virtual async Task<IdentityResult> ValidateAsync(RoleManager<TRole> manager, TRole role) 41return IdentityResult.Failed(errors); 43return IdentityResult.Success;
UserManager.cs (140)
480/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 483public virtual async Task<IdentityResult> CreateAsync(TUser user) 489var result = await CreateCoreAsync(user).ConfigureAwait(false); 500private async Task<IdentityResult> CreateCoreAsync(TUser user) 504var validateUserResult = await ValidateUserAsync(user).ConfigureAwait(false); 524/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 527public virtual async Task<IdentityResult> UpdateAsync(TUser user) 550/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 553public virtual async Task<IdentityResult> DeleteAsync(TUser user) 562var result = await Store.DeleteAsync(user, CancellationToken).ConfigureAwait(false); 630/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 633public virtual async Task<IdentityResult> CreateAsync(TUser user, string password) 643var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false); 720public virtual async Task<IdentityResult> SetUserNameAsync(TUser user, string? userName) 826/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 829public virtual async Task<IdentityResult> AddPasswordAsync(TUser user, string password) 834var result = await AddPasswordCoreAsync(user, password).ConfigureAwait(false); 845private async Task<IdentityResult> AddPasswordCoreAsync(TUser user, string password) 855return IdentityResult.Failed(ErrorDescriber.UserAlreadyHasPassword()); 857var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false); 873/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 876public virtual async Task<IdentityResult> ChangePasswordAsync(TUser user, string currentPassword, string newPassword) 881var result = await ChangePasswordCoreAsync(user, currentPassword, newPassword).ConfigureAwait(false); 892private async Task<IdentityResult> ChangePasswordCoreAsync(TUser user, string currentPassword, string newPassword) 900var updateResult = await UpdatePasswordHash(passwordStore, user, newPassword).ConfigureAwait(false); 908return IdentityResult.Failed(ErrorDescriber.PasswordMismatch()); 916/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 919public virtual async Task<IdentityResult> RemovePasswordAsync(TUser user) 984/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 990public virtual async Task<IdentityResult> UpdateSecurityStampAsync(TUser user) 1030/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1033public virtual async Task<IdentityResult> ResetPasswordAsync(TUser user, string token, string newPassword) 1043var failureResult = IdentityResult.Failed(ErrorDescriber.InvalidToken()); 1048var result = await UpdatePasswordHash(user, newPassword, validatePassword: true).ConfigureAwait(false); 1082/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1085public virtual async Task<IdentityResult> RemoveLoginAsync(TUser user, string loginProvider, string providerKey) 1113/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1116public virtual async Task<IdentityResult> AddLoginAsync(TUser user, UserLoginInfo login) 1121var result = await AddLoginCoreAsync(user, login).ConfigureAwait(false); 1132private async Task<IdentityResult> AddLoginCoreAsync(TUser user, UserLoginInfo login) 1143return IdentityResult.Failed(ErrorDescriber.LoginAlreadyAssociated()); 1170/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1173public virtual Task<IdentityResult> AddClaimAsync(TUser user, Claim claim) 1184/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1187public virtual async Task<IdentityResult> AddClaimsAsync(TUser user, IEnumerable<Claim> claims) 1214/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1217public virtual async Task<IdentityResult> ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim) 1244/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1247public virtual Task<IdentityResult> RemoveClaimAsync(TUser user, Claim claim) 1258/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1261public virtual async Task<IdentityResult> RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims) 1302/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1305public virtual async Task<IdentityResult> AddToRoleAsync(TUser user, string role) 1310var result = await AddToRoleCoreAsync(user, role).ConfigureAwait(false); 1321private async Task<IdentityResult> AddToRoleCoreAsync(TUser user, string role) 1342/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1345public virtual async Task<IdentityResult> AddToRolesAsync(TUser user, IEnumerable<string> roles) 1350var result = await AddToRolesCoreAsync(user, roles).ConfigureAwait(false); 1361private async Task<IdentityResult> AddToRolesCoreAsync(TUser user, IEnumerable<string> roles) 1386/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1389public virtual async Task<IdentityResult> RemoveFromRoleAsync(TUser user, string role) 1400var failureResult = UserNotInRoleError(role); 1409private IdentityResult UserAlreadyInRoleError(string role) 1415return IdentityResult.Failed(ErrorDescriber.UserAlreadyInRole(role)); 1418private IdentityResult UserNotInRoleError(string role) 1424return IdentityResult.Failed(ErrorDescriber.UserNotInRole(role)); 1433/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1436public virtual async Task<IdentityResult> RemoveFromRolesAsync(TUser user, IEnumerable<string> roles) 1441var result = await RemoveFromRolesCoreAsync(user, roles).ConfigureAwait(false); 1452private async Task<IdentityResult> RemoveFromRolesCoreAsync(TUser user, IEnumerable<string> roles) 1520/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1523public virtual async Task<IdentityResult> SetEmailAsync(TUser user, string? email) 1617/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1620public virtual async Task<IdentityResult> ConfirmEmailAsync(TUser user, string token) 1625var result = await ConfirmEmailCoreAsync(user, token).ConfigureAwait(false); 1636private async Task<IdentityResult> ConfirmEmailCoreAsync(TUser user, string token) 1644return IdentityResult.Failed(ErrorDescriber.InvalidToken()); 1688/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1691public virtual async Task<IdentityResult> ChangeEmailAsync(TUser user, string newEmail, string token) 1705private async Task<IdentityResult> ChangeEmailCoreAsync(TUser user, string newEmail, string token, long startTimestamp) 1713return IdentityResult.Failed(ErrorDescriber.InvalidToken()); 1741/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1744public virtual async Task<IdentityResult> SetPhoneNumberAsync(TUser user, string? phoneNumber) 1773/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 1776public virtual async Task<IdentityResult> ChangePhoneNumberAsync(TUser user, string phoneNumber, string token) 1781var result = await ChangePhoneNumberCoreAsync(user, phoneNumber, token).ConfigureAwait(false); 1792private async Task<IdentityResult> ChangePhoneNumberCoreAsync(TUser user, string phoneNumber, string token) 1801return IdentityResult.Failed(ErrorDescriber.InvalidToken()); 2060/// The <see cref="Task"/> that represents the asynchronous operation, the <see cref="IdentityResult"/> of the operation 2062public virtual async Task<IdentityResult> SetTwoFactorEnabledAsync(TUser user, bool enabled) 2111/// The <see cref="Task"/> that represents the asynchronous operation, the <see cref="IdentityResult"/> of the operation 2113public virtual async Task<IdentityResult> SetLockoutEnabledAsync(TUser user, bool enabled) 2168/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the operation.</returns> 2169public virtual async Task<IdentityResult> SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd) 2174var result = await SetLockoutEndDateCoreAsync(user, lockoutEnd).ConfigureAwait(false); 2185private async Task<IdentityResult> SetLockoutEndDateCoreAsync(TUser user, DateTimeOffset? lockoutEnd) 2194return IdentityResult.Failed(ErrorDescriber.UserLockoutNotEnabled()); 2206/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the operation.</returns> 2207public virtual async Task<IdentityResult> AccessFailedAsync(TUser user) 2239/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the operation.</returns> 2240public virtual async Task<IdentityResult> ResetAccessFailedCountAsync(TUser user) 2245var result = await ResetAccessFailedCountCoreAsync(user).ConfigureAwait(false); 2256private async Task<IdentityResult> ResetAccessFailedCountCoreAsync(TUser user) 2264return IdentityResult.Success; 2343public virtual async Task<IdentityResult> SetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName, string? tokenValue) 2372public virtual async Task<IdentityResult> RemoveAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) 2411public virtual async Task<IdentityResult> ResetAuthenticatorKeyAsync(TUser user) 2459var update = await UpdateUserAndRecordMetricAsync(user, UserUpdateType.GenerateNewTwoFactorRecoveryCodes, startTimestamp).ConfigureAwait(false); 2556public virtual async Task<IdentityResult> RedeemTwoFactorRecoveryCodeAsync(TUser user, string code) 2561var result = await RedeemTwoFactorRecoveryCodeCoreAsync(user, code).ConfigureAwait(false); 2572private async Task<IdentityResult> RedeemTwoFactorRecoveryCodeCoreAsync(TUser user, string code) 2583return IdentityResult.Failed(ErrorDescriber.RecoveryCodeRedemptionFailed()); 2606public virtual async Task<IdentityResult> AddOrUpdatePasskeyAsync(TUser user, UserPasskeyInfo passkey) 2611var result = await AddOrUpdatePasskeyCoreAsync(user, passkey).ConfigureAwait(false); 2622private async Task<IdentityResult> AddOrUpdatePasskeyCoreAsync(TUser user, UserPasskeyInfo passkey) 2689/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> 2692public virtual async Task<IdentityResult> RemovePasskeyAsync(TUser user, byte[] credentialId) 2697var result = await RemovePasskeyCoreAsync(user, credentialId).ConfigureAwait(false); 2708private async Task<IdentityResult> RemovePasskeyCoreAsync(TUser user, byte[] credentialId) 2802protected virtual Task<IdentityResult> UpdatePasswordHash(TUser user, string newPassword, bool validatePassword) 2805private async Task<IdentityResult> UpdatePasswordHash(IUserPasswordStore<TUser> passwordStore, 2810var validate = await ValidatePasswordAsync(user, newPassword).ConfigureAwait(false); 2819return IdentityResult.Success; 2882/// Should return <see cref="IdentityResult.Success"/> if validation is successful. This is 2886/// <returns>A <see cref="IdentityResult"/> representing whether validation was successful.</returns> 2887protected async Task<IdentityResult> ValidateUserAsync(TUser user) 2902var result = await v.ValidateAsync(this, user).ConfigureAwait(false); 2915return IdentityResult.Failed(errors); 2917return IdentityResult.Success; 2921/// Should return <see cref="IdentityResult.Success"/> if validation is successful. This is 2926/// <returns>A <see cref="IdentityResult"/> representing whether validation was successful.</returns> 2927protected async Task<IdentityResult> ValidatePasswordAsync(TUser user, string? password) 2933var result = await v.ValidateAsync(this, user, password).ConfigureAwait(false); 2951return IdentityResult.Failed(errors); 2953return IdentityResult.Success; 2961protected virtual async Task<IdentityResult> UpdateUserAsync(TUser user) 2965var result = await ValidateUserAsync(user).ConfigureAwait(false); 2975private async Task<IdentityResult> UpdateUserAndRecordMetricAsync(TUser user, UserUpdateType updateType, long startTimestamp) 2977var result = await UpdateUserAsync(user).ConfigureAwait(false);
UserManagerMetrics.cs (5)
72internal void CreateUser(string userType, IdentityResult? result, long startTimestamp, Exception? exception = null) 90internal void UpdateUser(string userType, IdentityResult? result, UserUpdateType updateType, long startTimestamp, Exception? exception = null) 109internal void DeleteUser(string userType, IdentityResult? result, long startTimestamp, Exception? exception = null) 214private static void AddIdentityResultTags(ref TagList tags, IdentityResult? result) 228private static void AddErrorTag(ref TagList tags, Exception? exception, IdentityResult? result = null)
UserValidator.cs (4)
39/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the validation operation.</returns> 40public virtual async Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user) 49return errors?.Count > 0 ? IdentityResult.Failed(errors) : IdentityResult.Success;
Microsoft.Extensions.Identity.Stores (12)
RoleStoreBase.cs (6)
54/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 55public abstract Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)); 62/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 63public abstract Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)); 70/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 71public abstract Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken));
UserStoreBase.cs (6)
189/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the creation operation.</returns> 190public abstract Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 197/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the update operation.</returns> 198public abstract Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 205/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/> of the update operation.</returns> 206public abstract Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken));