Packages

c

play.silhouette.api.util

PasswordHasherRegistry

final case class PasswordHasherRegistry(current: PasswordHasher, deprecated: Seq[PasswordHasher] = Seq.empty) 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.

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PasswordHasherRegistry
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PasswordHasherRegistry(current: PasswordHasher, deprecated: Seq[PasswordHasher] = Seq.empty)

    current

    The current password hasher used by the application.

    deprecated

    The deprecated list of password hashers.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  7. val current: PasswordHasher
  8. val deprecated: Seq[PasswordHasher]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. 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.

  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  12. 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.

  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. def productElementNames: Iterator[String]
    Definition Classes
    Product
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped