Class

com.mohiva.play.silhouette.api.util

PasswordHasherRegistry

Related Doc: package util

Permalink

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.

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

Instance Constructors

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

    Permalink

    current

    The current password hasher used by the application.

    deprecated

    The deprecated list of password hashers.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def all: Seq[PasswordHasher]

    Permalink

    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

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val current: PasswordHasher

    Permalink

    The current password hasher used by the application.

  8. val deprecated: Seq[PasswordHasher]

    Permalink

    The deprecated list of password hashers.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def find(passwordInfo: PasswordInfo): Option[PasswordHasher]

    Permalink

    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.

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def isDeprecated(hasher: PasswordHasher): Boolean

    Permalink

    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.

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped