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