3 instantiations of IdentityResult
Microsoft.Extensions.Identity.Core (3)
IdentityResult.cs (3)
15
private static readonly IdentityResult _success = new
IdentityResult
{ Succeeded = true };
44
var result = new
IdentityResult
{ Succeeded = false };
54
var result = new
IdentityResult
{ Succeeded = false };
254 references to IdentityResult
Microsoft.AspNetCore.Identity (35)
IdentityApiEndpointRouteBuilderExtensions.cs (9)
73
return CreateValidationProblem(
IdentityResult
.Failed(userManager.ErrorDescriber.InvalidEmail(email)));
79
var
result = await userManager.CreateAsync(user, registration.Password);
161
IdentityResult
result;
236
return CreateValidationProblem(
IdentityResult
.Failed(userManager.ErrorDescriber.InvalidToken()));
239
IdentityResult
result;
247
result =
IdentityResult
.Failed(userManager.ErrorDescriber.InvalidToken());
359
return CreateValidationProblem(
IdentityResult
.Failed(userManager.ErrorDescriber.InvalidEmail(infoRequest.NewEmail)));
370
var
changePasswordResult = await userManager.ChangePasswordAsync(user, infoRequest.OldPassword, infoRequest.NewPassword);
429
private static ValidationProblem CreateValidationProblem(
IdentityResult
result)
SignInManager.cs (26)
485
var
resetLockoutResult = await ResetLockoutWithResult(user);
502
var
incrementLockoutResult = await UserManager.AccessFailedAsync(user) ??
IdentityResult
.Success;
680
var
setPasskeyResult = await UserManager.AddOrUpdatePasskeyAsync(assertionResult.User, assertionResult.Passkey);
829
var
result = await UserManager.RedeemTwoFactorRecoveryCodeAsync(twoFactorInfo.User, recoveryCode);
841
var
resetLockoutResult = await ResetLockoutWithResult(user);
925
var
incrementLockoutResult = await UserManager.AccessFailedAsync(user) ??
IdentityResult
.Success;
989
var
incrementLockoutResult = await UserManager.AccessFailedAsync(user) ??
IdentityResult
.Success;
1127
/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/> of the operation.</returns>
1128
public virtual async Task<
IdentityResult
> UpdateExternalAuthenticationTokensAsync(ExternalLoginInfo externalLogin)
1137
return
IdentityResult
.Failed();
1142
var
result = await UserManager.SetAuthenticationTokenAsync(user, externalLogin.LoginProvider, token.Name, token.Value);
1150
return
IdentityResult
.Success;
1337
/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/> of the operation.</returns>
1343
var
result = await UserManager.ResetAccessFailedCountAsync(user) ??
IdentityResult
.Success;
1352
private async Task<
IdentityResult
> ResetLockoutWithResult(TUser user)
1359
return
IdentityResult
.Success;
1362
return await UserManager.ResetAccessFailedCountAsync(user) ??
IdentityResult
.Success;
1369
if (resetLockoutTask is Task<
IdentityResult
> resultTask)
1371
return await resultTask ??
IdentityResult
.Success;
1375
return
IdentityResult
.Success;
1385
internal IdentityResultException(
IdentityResult
result) : base()
1390
internal
IdentityResult
IdentityResult { get; set; }
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)
15
private 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>
35
public 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>
42
public static
IdentityResult
Failed(params IdentityError[] errors)
44
var
result = new IdentityResult { Succeeded = false };
52
internal static
IdentityResult
Failed(List<IdentityError>? errors)
54
var
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)
21
Task<
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>
22
Task<
IdentityResult
> CreateAsync(TRole role, CancellationToken cancellationToken);
29
/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="
IdentityResult
"/> of the asynchronous query.</returns>
30
Task<
IdentityResult
> UpdateAsync(TRole role, CancellationToken cancellationToken);
37
/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="
IdentityResult
"/> of the asynchronous query.</returns>
38
Task<
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>
20
Task<
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>
64
Task<
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>
72
Task<
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>
80
Task<
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>
20
Task<
IdentityResult
> ValidateAsync(UserManager<TUser> manager, TUser user);
PasswordValidator.cs (3)
40
public virtual Task<
IdentityResult
> ValidateAsync(UserManager<TUser> manager, TUser user, string? password)
78
?
IdentityResult
.Failed(errors)
79
:
IdentityResult
.Success);
RoleManager.cs (21)
155
public virtual async Task<
IdentityResult
> CreateAsync(TRole role)
159
var
result = await ValidateRoleAsync(role).ConfigureAwait(false);
187
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/> for the update.
189
public virtual Task<
IdentityResult
> UpdateAsync(TRole role)
202
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/> for the delete.
204
public virtual Task<
IdentityResult
> DeleteAsync(TRole role)
272
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
275
public virtual async Task<
IdentityResult
> SetRoleNameAsync(TRole role, string? name)
281
return
IdentityResult
.Success;
320
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
323
public virtual async Task<
IdentityResult
> AddClaimAsync(TRole role, Claim claim)
340
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
343
public 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>
397
protected virtual async Task<
IdentityResult
> ValidateRoleAsync(TRole role)
402
var
result = await v.ValidateAsync(this, role).ConfigureAwait(false);
415
return
IdentityResult
.Failed(errors);
417
return
IdentityResult
.Success;
425
protected virtual async Task<
IdentityResult
> UpdateRoleAsync(TRole role)
427
var
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>
34
public virtual async Task<
IdentityResult
> ValidateAsync(RoleManager<TRole> manager, TRole role)
41
return
IdentityResult
.Failed(errors);
43
return
IdentityResult
.Success;
UserManager.cs (140)
482
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
485
public virtual async Task<
IdentityResult
> CreateAsync(TUser user)
491
var
result = await CreateCoreAsync(user).ConfigureAwait(false);
502
private async Task<
IdentityResult
> CreateCoreAsync(TUser user)
506
var
validateUserResult = await ValidateUserAsync(user).ConfigureAwait(false);
526
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
529
public virtual async Task<
IdentityResult
> UpdateAsync(TUser user)
552
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
555
public virtual async Task<
IdentityResult
> DeleteAsync(TUser user)
564
var
result = await Store.DeleteAsync(user, CancellationToken).ConfigureAwait(false);
632
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
635
public virtual async Task<
IdentityResult
> CreateAsync(TUser user, string password)
645
var
result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false);
722
public virtual async Task<
IdentityResult
> SetUserNameAsync(TUser user, string? userName)
828
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
831
public virtual async Task<
IdentityResult
> AddPasswordAsync(TUser user, string password)
836
var
result = await AddPasswordCoreAsync(user, password).ConfigureAwait(false);
847
private async Task<
IdentityResult
> AddPasswordCoreAsync(TUser user, string password)
857
return
IdentityResult
.Failed(ErrorDescriber.UserAlreadyHasPassword());
859
var
result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false);
875
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
878
public virtual async Task<
IdentityResult
> ChangePasswordAsync(TUser user, string currentPassword, string newPassword)
883
var
result = await ChangePasswordCoreAsync(user, currentPassword, newPassword).ConfigureAwait(false);
894
private async Task<
IdentityResult
> ChangePasswordCoreAsync(TUser user, string currentPassword, string newPassword)
902
var
updateResult = await UpdatePasswordHash(passwordStore, user, newPassword).ConfigureAwait(false);
910
return
IdentityResult
.Failed(ErrorDescriber.PasswordMismatch());
918
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
921
public virtual async Task<
IdentityResult
> RemovePasswordAsync(TUser user)
986
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
992
public virtual async Task<
IdentityResult
> UpdateSecurityStampAsync(TUser user)
1032
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1035
public virtual async Task<
IdentityResult
> ResetPasswordAsync(TUser user, string token, string newPassword)
1045
var
failureResult =
IdentityResult
.Failed(ErrorDescriber.InvalidToken());
1050
var
result = await UpdatePasswordHash(user, newPassword, validatePassword: true).ConfigureAwait(false);
1084
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1087
public virtual async Task<
IdentityResult
> RemoveLoginAsync(TUser user, string loginProvider, string providerKey)
1115
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1118
public virtual async Task<
IdentityResult
> AddLoginAsync(TUser user, UserLoginInfo login)
1123
var
result = await AddLoginCoreAsync(user, login).ConfigureAwait(false);
1134
private async Task<
IdentityResult
> AddLoginCoreAsync(TUser user, UserLoginInfo login)
1145
return
IdentityResult
.Failed(ErrorDescriber.LoginAlreadyAssociated());
1172
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1175
public virtual Task<
IdentityResult
> AddClaimAsync(TUser user, Claim claim)
1186
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1189
public virtual async Task<
IdentityResult
> AddClaimsAsync(TUser user, IEnumerable<Claim> claims)
1216
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1219
public virtual async Task<
IdentityResult
> ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim)
1246
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1249
public virtual Task<
IdentityResult
> RemoveClaimAsync(TUser user, Claim claim)
1260
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1263
public virtual async Task<
IdentityResult
> RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims)
1304
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1307
public virtual async Task<
IdentityResult
> AddToRoleAsync(TUser user, string role)
1312
var
result = await AddToRoleCoreAsync(user, role).ConfigureAwait(false);
1323
private async Task<
IdentityResult
> AddToRoleCoreAsync(TUser user, string role)
1344
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1347
public virtual async Task<
IdentityResult
> AddToRolesAsync(TUser user, IEnumerable<string> roles)
1352
var
result = await AddToRolesCoreAsync(user, roles).ConfigureAwait(false);
1363
private async Task<
IdentityResult
> AddToRolesCoreAsync(TUser user, IEnumerable<string> roles)
1388
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1391
public virtual async Task<
IdentityResult
> RemoveFromRoleAsync(TUser user, string role)
1402
var
failureResult = UserNotInRoleError(role);
1411
private
IdentityResult
UserAlreadyInRoleError(string role)
1417
return
IdentityResult
.Failed(ErrorDescriber.UserAlreadyInRole(role));
1420
private
IdentityResult
UserNotInRoleError(string role)
1426
return
IdentityResult
.Failed(ErrorDescriber.UserNotInRole(role));
1435
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1438
public virtual async Task<
IdentityResult
> RemoveFromRolesAsync(TUser user, IEnumerable<string> roles)
1443
var
result = await RemoveFromRolesCoreAsync(user, roles).ConfigureAwait(false);
1454
private async Task<
IdentityResult
> RemoveFromRolesCoreAsync(TUser user, IEnumerable<string> roles)
1522
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1525
public virtual async Task<
IdentityResult
> SetEmailAsync(TUser user, string? email)
1619
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1622
public virtual async Task<
IdentityResult
> ConfirmEmailAsync(TUser user, string token)
1627
var
result = await ConfirmEmailCoreAsync(user, token).ConfigureAwait(false);
1638
private async Task<
IdentityResult
> ConfirmEmailCoreAsync(TUser user, string token)
1646
return
IdentityResult
.Failed(ErrorDescriber.InvalidToken());
1690
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1693
public virtual async Task<
IdentityResult
> ChangeEmailAsync(TUser user, string newEmail, string token)
1707
private async Task<
IdentityResult
> ChangeEmailCoreAsync(TUser user, string newEmail, string token, long startTimestamp)
1715
return
IdentityResult
.Failed(ErrorDescriber.InvalidToken());
1743
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1746
public virtual async Task<
IdentityResult
> SetPhoneNumberAsync(TUser user, string? phoneNumber)
1775
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
1778
public virtual async Task<
IdentityResult
> ChangePhoneNumberAsync(TUser user, string phoneNumber, string token)
1783
var
result = await ChangePhoneNumberCoreAsync(user, phoneNumber, token).ConfigureAwait(false);
1794
private async Task<
IdentityResult
> ChangePhoneNumberCoreAsync(TUser user, string phoneNumber, string token)
1803
return
IdentityResult
.Failed(ErrorDescriber.InvalidToken());
2062
/// The <see cref="Task"/> that represents the asynchronous operation, the <see cref="
IdentityResult
"/> of the operation
2064
public virtual async Task<
IdentityResult
> SetTwoFactorEnabledAsync(TUser user, bool enabled)
2113
/// The <see cref="Task"/> that represents the asynchronous operation, the <see cref="
IdentityResult
"/> of the operation
2115
public virtual async Task<
IdentityResult
> SetLockoutEnabledAsync(TUser user, bool enabled)
2170
/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/> of the operation.</returns>
2171
public virtual async Task<
IdentityResult
> SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd)
2176
var
result = await SetLockoutEndDateCoreAsync(user, lockoutEnd).ConfigureAwait(false);
2187
private async Task<
IdentityResult
> SetLockoutEndDateCoreAsync(TUser user, DateTimeOffset? lockoutEnd)
2196
return
IdentityResult
.Failed(ErrorDescriber.UserLockoutNotEnabled());
2208
/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/> of the operation.</returns>
2209
public virtual async Task<
IdentityResult
> AccessFailedAsync(TUser user)
2241
/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/> of the operation.</returns>
2242
public virtual async Task<
IdentityResult
> ResetAccessFailedCountAsync(TUser user)
2247
var
result = await ResetAccessFailedCountCoreAsync(user).ConfigureAwait(false);
2258
private async Task<
IdentityResult
> ResetAccessFailedCountCoreAsync(TUser user)
2266
return
IdentityResult
.Success;
2345
public virtual async Task<
IdentityResult
> SetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName, string? tokenValue)
2374
public virtual async Task<
IdentityResult
> RemoveAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName)
2413
public virtual async Task<
IdentityResult
> ResetAuthenticatorKeyAsync(TUser user)
2461
var
update = await UpdateUserAndRecordMetricAsync(user, UserUpdateType.GenerateNewTwoFactorRecoveryCodes, startTimestamp).ConfigureAwait(false);
2558
public virtual async Task<
IdentityResult
> RedeemTwoFactorRecoveryCodeAsync(TUser user, string code)
2563
var
result = await RedeemTwoFactorRecoveryCodeCoreAsync(user, code).ConfigureAwait(false);
2574
private async Task<
IdentityResult
> RedeemTwoFactorRecoveryCodeCoreAsync(TUser user, string code)
2585
return
IdentityResult
.Failed(ErrorDescriber.RecoveryCodeRedemptionFailed());
2608
public virtual async Task<
IdentityResult
> AddOrUpdatePasskeyAsync(TUser user, UserPasskeyInfo passkey)
2613
var
result = await AddOrUpdatePasskeyCoreAsync(user, passkey).ConfigureAwait(false);
2624
private async Task<
IdentityResult
> AddOrUpdatePasskeyCoreAsync(TUser user, UserPasskeyInfo passkey)
2691
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="
IdentityResult
"/>
2694
public virtual async Task<
IdentityResult
> RemovePasskeyAsync(TUser user, byte[] credentialId)
2699
var
result = await RemovePasskeyCoreAsync(user, credentialId).ConfigureAwait(false);
2710
private async Task<
IdentityResult
> RemovePasskeyCoreAsync(TUser user, byte[] credentialId)
2817
protected virtual Task<
IdentityResult
> UpdatePasswordHash(TUser user, string newPassword, bool validatePassword)
2820
private async Task<
IdentityResult
> UpdatePasswordHash(IUserPasswordStore<TUser> passwordStore,
2825
var
validate = await ValidatePasswordAsync(user, newPassword).ConfigureAwait(false);
2834
return
IdentityResult
.Success;
2897
/// Should return <see cref="
IdentityResult
.Success"/> if validation is successful. This is
2901
/// <returns>A <see cref="
IdentityResult
"/> representing whether validation was successful.</returns>
2902
protected async Task<
IdentityResult
> ValidateUserAsync(TUser user)
2917
var
result = await v.ValidateAsync(this, user).ConfigureAwait(false);
2930
return
IdentityResult
.Failed(errors);
2932
return
IdentityResult
.Success;
2936
/// Should return <see cref="
IdentityResult
.Success"/> if validation is successful. This is
2941
/// <returns>A <see cref="
IdentityResult
"/> representing whether validation was successful.</returns>
2942
protected async Task<
IdentityResult
> ValidatePasswordAsync(TUser user, string? password)
2948
var
result = await v.ValidateAsync(this, user, password).ConfigureAwait(false);
2966
return
IdentityResult
.Failed(errors);
2968
return
IdentityResult
.Success;
2976
protected virtual async Task<
IdentityResult
> UpdateUserAsync(TUser user)
2980
var
result = await ValidateUserAsync(user).ConfigureAwait(false);
2990
private async Task<
IdentityResult
> UpdateUserAndRecordMetricAsync(TUser user, UserUpdateType updateType, long startTimestamp)
2992
var
result = await UpdateUserAsync(user).ConfigureAwait(false);
UserManagerMetrics.cs (5)
72
internal void CreateUser(string userType,
IdentityResult
? result, long startTimestamp, Exception? exception = null)
90
internal void UpdateUser(string userType,
IdentityResult
? result, UserUpdateType updateType, long startTimestamp, Exception? exception = null)
109
internal void DeleteUser(string userType,
IdentityResult
? result, long startTimestamp, Exception? exception = null)
214
private static void AddIdentityResultTags(ref TagList tags,
IdentityResult
? result)
228
private 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>
40
public virtual async Task<
IdentityResult
> ValidateAsync(UserManager<TUser> manager, TUser user)
49
return 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>
55
public 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>
63
public 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>
71
public 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>
190
public 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>
198
public 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>
206
public abstract Task<
IdentityResult
> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken));