Class UmbracoPasswordHasher<TUser>
Inheritance
object
PasswordHasher<TUser>
Namespace: Umbraco.Cms.Core.Security
Assembly: Umbraco.Infrastructure.dll
Syntax
public class UmbracoPasswordHasher<TUser> : PasswordHasher<TUser> where TUser : UmbracoIdentityUser
Type Parameters
| Name | Description |
|---|---|
| TUser |
Constructors
View SourceUmbracoPasswordHasher(LegacyPasswordSecurity, IJsonSerializer)
Declaration
public UmbracoPasswordHasher(LegacyPasswordSecurity legacyPasswordSecurity, IJsonSerializer jsonSerializer)
Parameters
| Type | Name | Description |
|---|---|---|
| LegacyPasswordSecurity | legacyPasswordSecurity | |
| IJsonSerializer | jsonSerializer |
Properties
View SourceLegacyPasswordSecurity
Declaration
public LegacyPasswordSecurity LegacyPasswordSecurity { get; }
Property Value
| Type | Description |
|---|---|
| LegacyPasswordSecurity |
Methods
View SourceHashPassword(TUser, string)
Returns a hashed representation of the supplied password for the specified user.
Declaration
public override string HashPassword(TUser user, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| TUser | user | The user whose password is to be hashed. |
| string | password | The password to hash. |
Returns
| Type | Description |
|---|---|
| string | A hashed representation of the supplied |
VerifyHashedPassword(TUser, string, string)
Verifies a user's hashed password
Declaration
public override PasswordVerificationResult VerifyHashedPassword(TUser user, string hashedPassword, string providedPassword)
Parameters
| Type | Name | Description |
|---|---|---|
| TUser | user | |
| string | hashedPassword | |
| string | providedPassword |
Returns
| Type | Description |
|---|---|
| PasswordVerificationResult |
Remarks
This will check the user's current hashed password format stored with their user row and use that to verify the hash. This could be any hashes from the very old v4, to the older v6-v8, to the older aspnet identity and finally to the most recent