case class PasswordHasherRegistry(current: PasswordHasher, deprecated: Seq[PasswordHasher] = Seq()) extends Product with Serializable
Defines the password hashers used by the application.
Sometimes it's needed to change the password hashing algorithm, because of a better algorithm or some similar case. But the passwords stored in the backing store cannot easily be converted with another algorithm because they're hashed and cannot be decrypted back to plain text. For such case Silhouette supports the change of hashing algorithms on the fly. So if a user successfully authenticates after the application has changed the hashing algorithm, the provider hashes the entered plain-text password again with the new algorithm and overrides the auth info in the backing store with the new hash.
The password hasher registry defines the current password hasher which is able to hash all new passwords and also match the passwords stored in the backing store for this algorithm. And also a list of deprecated hashers, which should match passwords that are stored in the baking store but which are different to the current hasher.
- current
The current password hasher used by the application.
- deprecated
The deprecated list of password hashers.
- Alphabetic
- By Inheritance
- PasswordHasherRegistry
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
PasswordHasherRegistry(current: PasswordHasher, deprecated: Seq[PasswordHasher] = Seq())
- current
The current password hasher used by the application.
- deprecated
The deprecated list of password hashers.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
all: Seq[PasswordHasher]
Returns the complete list of supported password hashers.
Returns the complete list of supported password hashers.
- returns
The complete list of supported password hashers.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val current: PasswordHasher
- val deprecated: Seq[PasswordHasher]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
find(passwordInfo: PasswordInfo): Option[PasswordHasher]
Finds the password hasher suitable for the given password info.
Finds the password hasher suitable for the given password info.
First it checks if the current hasher is suitable for the given password hasher. As next it checks if a deprecated password hasher is suitable for the given password info. If non of the registered password hasher is suitable for the given password info, this method returns
None.- passwordInfo
The password info to return a suitable password hasher for.
- returns
Maybe a suitable password hasher, otherwise None.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isDeprecated(hasher: PasswordHasher): Boolean
Indicates if a hasher is in the list of deprecated hashers.
Indicates if a hasher is in the list of deprecated hashers.
- hasher
The hasher to check the deprecation status for.
- returns
True if the given hasher is deprecated, false otherwise.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()