1 write to Logger
Microsoft.Extensions.Identity.Core (1)
UserManager.cs (1)
85
Logger
= logger;
53 references to Logger
Microsoft.AspNetCore.Identity.Specification.Tests (34)
IdentitySpecificationTestBase.cs (2)
488
IdentityResultAssert.VerifyLogMessage(userMgr.
Logger
, $"User is not in role {roleName}.");
509
IdentityResultAssert.VerifyLogMessage(userMgr.
Logger
, $"User is already in role {roleName}.");
UserManagerSpecificationTests.cs (32)
253
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User validation failed: {error.Code}.");
257
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User validation failed: {error.Code}.");
332
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"Invalid password for user.");
361
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
377
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
394
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User validation failed: {AlwaysBadValidator.ErrorMessage.Code};{AlwaysBadValidator.ErrorMessage.Code}.");
442
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
530
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
545
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
625
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, "User already has a password.");
829
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, "Change password failed for user.");
906
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, "AddLogin for user failed because it was already associated with another user.");
1028
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"User password validation failed: {AlwaysBadValidator.ErrorMessage.Code}.");
1050
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: ResetPassword for user.");
1074
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: test2 for user.");
1077
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: test for user.");
1080
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: test for user.");
1120
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: EmailConfirmation for user.");
1138
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: EmailConfirmation for user.");
1161
IdentityResultAssert.VerifyLogMessage(mgr.
Logger
, $"User is locked out.");
1187
IdentityResultAssert.VerifyLogMessage(mgr.
Logger
, $"User is locked out.");
1243
IdentityResultAssert.VerifyLogMessage(mgr.
Logger
, $"User is locked out.");
1277
IdentityResultAssert.VerifyLogMessage(mgr.
Logger
, $"Lockout for user failed because lockout is not enabled for this user.");
1407
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:111-111-1111 for user.");
1486
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:{num1} for user.");
1487
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:{num2} for user.");
1601
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: ChangeEmail:whatevah@foo.boop for user.");
1625
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyUserTokenAsync() failed with purpose: ChangeEmail:oops@foo.boop for user.");
1658
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyTwoFactorTokenAsync() failed for user.");
1855
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyTwoFactorTokenAsync() failed for user.");
1871
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyTwoFactorTokenAsync() failed for user.");
1885
IdentityResultAssert.VerifyLogMessage(manager.
Logger
, $"VerifyTwoFactorTokenAsync() failed for user.");
Microsoft.Extensions.Identity.Core (19)
UserManager.cs (19)
694
Logger
.LogDebug(LoggerEventIds.InvalidPassword, "Invalid password for user.");
735
Logger
.LogDebug(LoggerEventIds.UserAlreadyHasPassword, "User already has a password.");
772
Logger
.LogDebug(LoggerEventIds.ChangePasswordFailed, "Change password failed for user.");
827
Logger
.LogDebug(LoggerEventIds.GetSecurityStampFailed, "GetSecurityStampAsync for user failed because stamp was null.");
956
Logger
.LogDebug(LoggerEventIds.AddLoginFailed, "AddLogin for user failed because it was already associated with another user.");
1169
if (
Logger
.IsEnabled(LogLevel.Debug))
1171
Logger
.LogDebug(LoggerEventIds.UserAlreadyInRole, "User is already in role {role}.", role);
1178
if (
Logger
.IsEnabled(LogLevel.Debug))
1180
Logger
.LogDebug(LoggerEventIds.UserNotInRole, "User is not in role {role}.", role);
1478
Logger
.LogDebug(LoggerEventIds.PhoneNumberChanged, "Change phone number for user failed with invalid token.");
1562
if (!result &&
Logger
.IsEnabled(LogLevel.Debug))
1564
Logger
.LogDebug(LoggerEventIds.VerifyUserTokenFailed, "VerifyUserTokenAsync() failed with purpose: {purpose} for user.", purpose);
1652
Logger
.LogDebug(LoggerEventIds.VerifyTwoFactorTokenFailed, $"{nameof(VerifyTwoFactorTokenAsync)}() failed for user.");
1801
Logger
.LogDebug(LoggerEventIds.LockoutFailed, "Lockout for user failed because lockout is not enabled for this user.");
1827
Logger
.LogDebug(LoggerEventIds.UserLockedOut, "User is locked out.");
2321
if (
Logger
.IsEnabled(LogLevel.Debug))
2323
Logger
.LogDebug(LoggerEventIds.UserValidationFailed, "User validation failed: {errors}.", string.Join(";", errors.Select(e => e.Code)));
2357
if (
Logger
.IsEnabled(LogLevel.Debug))
2359
Logger
.LogDebug(LoggerEventIds.PasswordValidationFailed, "User password validation failed: {errors}.", string.Join(";", errors?.Select(e => e.Code) ?? Array.Empty<string>()));