41 references to PasswordVerificationResult
Microsoft.AspNetCore.Identity.Test (18)
PasswordHasherTest.cs (17)
59var successResult = hasher.VerifyHashedPassword(null, hashedPassword, "password 1"); 60Assert.Equal(PasswordVerificationResult.Success, successResult); 63var failedResult = hasher.VerifyHashedPassword(null, hashedPassword, "password 2"); 64Assert.Equal(PasswordVerificationResult.Failed, failedResult); 121var result = hasher.VerifyHashedPassword(null, hashedPassword, Plaintext_Password); 124Assert.Equal(PasswordVerificationResult.Failed, result); 140var result = hasher.VerifyHashedPassword(null, hashedPassword, Plaintext_Password); 143Assert.Equal(PasswordVerificationResult.Success, result); 148[InlineData(V2_SHA1_1000iter_128salt_256subkey, PasswordVerificationResult.SuccessRehashNeeded)] 150[InlineData(V3_SHA1_250iter_128salt_128subkey, PasswordVerificationResult.SuccessRehashNeeded)] 151[InlineData(V3_SHA256_250000iter_256salt_256subkey, PasswordVerificationResult.SuccessRehashNeeded)] 152[InlineData(V3_SHA512_50iter_128salt_128subkey, PasswordVerificationResult.SuccessRehashNeeded)] 153[InlineData(V3_SHA512_250iter_256salt_512subkey, PasswordVerificationResult.SuccessRehashNeeded)] 154[InlineData(V3_SHA512_10000iter_128salt_256subkey, PasswordVerificationResult.SuccessRehashNeeded)] 155[InlineData(V3_SHA512_100000iter_128salt_256subkey, PasswordVerificationResult.Success)] 156public void VerifyHashedPassword_Version3CompatMode_SuccessCases(string hashedPassword, PasswordVerificationResult expectedResult) 162var actualResult = hasher.VerifyHashedPassword(null, hashedPassword, Plaintext_Password);
UserManagerTest.cs (1)
581hasher.Setup(s => s.VerifyHashedPassword(user, hashed, pwd)).Returns(PasswordVerificationResult.SuccessRehashNeeded).Verifiable();
Microsoft.Extensions.Identity.Core (23)
IPasswordHasher.cs (3)
21/// Returns a <see cref="PasswordVerificationResult"/> indicating the result of a password hash comparison. 26/// <returns>A <see cref="PasswordVerificationResult"/> indicating the result of a password hash comparison.</returns> 28PasswordVerificationResult VerifyHashedPassword(TUser user, string hashedPassword, string providedPassword);
PasswordHasher.cs (12)
159/// Returns a <see cref="PasswordVerificationResult"/> indicating the result of a password hash comparison. 164/// <returns>A <see cref="PasswordVerificationResult"/> indicating the result of a password hash comparison.</returns> 166public virtual PasswordVerificationResult VerifyHashedPassword(TUser user, string hashedPassword, string providedPassword) 176return PasswordVerificationResult.Failed; 185? PasswordVerificationResult.SuccessRehashNeeded 186: PasswordVerificationResult.Success; 190return PasswordVerificationResult.Failed; 199return PasswordVerificationResult.SuccessRehashNeeded; 205return PasswordVerificationResult.SuccessRehashNeeded; 208return PasswordVerificationResult.Success; 212return PasswordVerificationResult.Failed; 216return PasswordVerificationResult.Failed; // unknown format marker
UserManager.cs (8)
684var result = await VerifyPasswordAsync(passwordStore, user, password).ConfigureAwait(false); 685if (result == PasswordVerificationResult.SuccessRehashNeeded) 691var success = result != PasswordVerificationResult.Failed; 763if (await VerifyPasswordAsync(passwordStore, user, currentPassword).ConfigureAwait(false) != PasswordVerificationResult.Failed) 795/// Returns a <see cref="PasswordVerificationResult"/> indicating the result of a password hash comparison. 801/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="PasswordVerificationResult"/> 804protected virtual async Task<PasswordVerificationResult> VerifyPasswordAsync(IUserPasswordStore<TUser> store, TUser user, string password) 809return PasswordVerificationResult.Failed;