25 writes to Code
Microsoft.AspNetCore.Identity.Specification.Tests (2)
IdentitySpecificationTestBase.cs (1)
141public static readonly IdentityError ErrorMessage = new IdentityError { Description = "I'm Bad.", Code = "BadValidator" };
UserManagerSpecificationTests.cs (1)
143public static readonly IdentityError ErrorMessage = new IdentityError { Description = "I'm Bad.", Code = "BadValidator" };
Microsoft.AspNetCore.Identity.Test (1)
UserManagerTest.cs (1)
1785return new IdentityError { Code = Code, Description = string.Format(CultureInfo.InvariantCulture, FormatError, email) };
Microsoft.Extensions.Identity.Core (22)
IdentityErrorDescriber.cs (22)
24Code = nameof(DefaultError), 37Code = nameof(ConcurrencyFailure), 50Code = nameof(PasswordMismatch), 63Code = nameof(InvalidToken), 76Code = nameof(RecoveryCodeRedemptionFailed), 89Code = nameof(LoginAlreadyAssociated), 103Code = nameof(InvalidUserName), 117Code = nameof(InvalidEmail), 131Code = nameof(DuplicateUserName), 145Code = nameof(DuplicateEmail), 159Code = nameof(InvalidRoleName), 173Code = nameof(DuplicateRoleName), 186Code = nameof(UserAlreadyHasPassword), 199Code = nameof(UserLockoutNotEnabled), 213Code = nameof(UserAlreadyInRole), 227Code = nameof(UserNotInRole), 241Code = nameof(PasswordTooShort), 255Code = nameof(PasswordRequiresUniqueChars), 268Code = nameof(PasswordRequiresNonAlphanumeric), 281Code = nameof(PasswordRequiresDigit), 294Code = nameof(PasswordRequiresLower), 307Code = nameof(PasswordRequiresUpper),
23 references to Code
Microsoft.AspNetCore.Identity (3)
IdentityApiEndpointRouteBuilderExtensions.cs (2)
440if (errorDictionary.TryGetValue(error.Code, out var descriptions)) 451errorDictionary[error.Code] = newDescriptions;
SignInManager.cs (1)
998sb.Append(error.Code);
Microsoft.AspNetCore.Identity.Specification.Tests (16)
IdentityResultAssert.cs (2)
54Assert.Equal(error.Code, result.Errors.FirstOrDefault()?.Code);
IdentitySpecificationTestBase.cs (4)
172IdentityResultAssert.VerifyLogMessage(manager.Logger, $"Role {await manager.GetRoleIdAsync(role) ?? NullValue} validation failed: {AlwaysBadValidator.ErrorMessage.Code}."); 189IdentityResultAssert.VerifyLogMessage(manager.Logger, $"Role {await manager.GetRoleIdAsync(role) ?? NullValue} validation failed: {AlwaysBadValidator.ErrorMessage.Code};{AlwaysBadValidator.ErrorMessage.Code}."); 207IdentityResultAssert.VerifyLogMessage(manager.Logger, $"Role {await manager.GetRoleIdAsync(role) ?? NullValue} validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
UserManagerSpecificationTests.cs (10)
253IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User validation failed: {error.Code}."); 257IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User validation failed: {error.Code}."); 361IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User validation failed: {AlwaysBadValidator.ErrorMessage.Code}."); 377IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User validation failed: {AlwaysBadValidator.ErrorMessage.Code}."); 394IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User validation failed: {AlwaysBadValidator.ErrorMessage.Code};{AlwaysBadValidator.ErrorMessage.Code}."); 442IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}."); 530IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}."); 545IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}."); 1028IdentityResultAssert.VerifyLogMessage(manager.Logger, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
Microsoft.Extensions.Identity.Core (4)
IdentityResult.cs (1)
74string.Format(CultureInfo.InvariantCulture, "{0} : {1}", "Failed", string.Join(",", Errors.Select(x => x.Code).ToList()));
RoleManager.cs (1)
413Logger.LogWarning(LoggerEventIds.RoleValidationFailed, "Role {roleId} validation failed: {errors}.", await GetRoleIdAsync(role).ConfigureAwait(false), string.Join(";", errors.Select(e => e.Code)));
UserManager.cs (2)
2323Logger.LogDebug(LoggerEventIds.UserValidationFailed, "User validation failed: {errors}.", string.Join(";", errors.Select(e => e.Code))); 2359Logger.LogDebug(LoggerEventIds.PasswordValidationFailed, "User password validation failed: {errors}.", string.Join(";", errors?.Select(e => e.Code) ?? Array.Empty<string>()));