Packages

class CredentialsProvider extends PasswordProvider

A provider for authenticating with credentials.

The provider supports the change of password hashing algorithms on the fly. Sometimes it may be possible to change the hashing algorithm used by the application. But the hashes stored in the backing store can't be converted back into plain text passwords, to hash them again with the new algorithm. So if a user successfully authenticates after the application has changed the hashing algorithm, the provider hashes the entered password again with the new algorithm and stores the auth info in the backing store.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CredentialsProvider
  2. PasswordProvider
  3. ExecutionContextProvider
  4. Provider
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CredentialsProvider(authInfoRepository: AuthInfoRepository, passwordHasherRegistry: PasswordHasherRegistry)(implicit executionContext: ExecutionContext)

    authInfoRepository

    The auth info repository.

    passwordHasherRegistry

    The password hashers used by the application.

    executionContext

    The execution context to handle the asynchronous operations.

    Annotations
    @Inject()

Type Members

  1. case class InvalidPassword(error: String) extends State with Product with Serializable

    Indicates that the entered password doesn't match with the stored one.

    Indicates that the entered password doesn't match with the stored one.

    Definition Classes
    PasswordProvider
  2. case class NotFound(error: String) extends State with Product with Serializable

    Indicates that no password info was stored for the login info.

    Indicates that no password info was stored for the login info.

    Definition Classes
    PasswordProvider
  3. sealed trait State extends AnyRef

    The authentication state.

    The authentication state.

    Definition Classes
    PasswordProvider
  4. case class UnsupportedHasher(error: String) extends State with Product with Serializable

    Indicates that the stored password cannot be checked with the registered hashers.

    Indicates that the stored password cannot be checked with the registered hashers.

    Definition Classes
    PasswordProvider

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val authInfoRepository: AuthInfoRepository

    The auth info repository.

    The auth info repository.

    Attributes
    protected
    Definition Classes
    CredentialsProviderPasswordProvider
  6. def authenticate(credentials: Credentials): Future[LoginInfo]

    Authenticates a user with its credentials.

    Authenticates a user with its credentials.

    credentials

    The credentials to authenticate with.

    returns

    The login info if the authentication was successful, otherwise a failure.

  7. def authenticate(loginInfo: LoginInfo, password: String): Future[State]

    Authenticates a user

    Authenticates a user

    loginInfo

    The login info to search the password info for.

    password

    The user password to authenticate with.

    returns

    The authentication state.

    Definition Classes
    PasswordProvider
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. implicit val executionContext: ExecutionContext

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    CredentialsProviderExecutionContextProvider
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  14. def id: String

    Gets the provider ID.

    Gets the provider ID.

    returns

    The provider ID.

    Definition Classes
    CredentialsProviderProvider
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def loginInfo(credentials: Credentials): Future[LoginInfo]

    Gets the login info for the given credentials.

    Gets the login info for the given credentials.

    Override this method to manipulate the creation of the login info from the credentials.

    By default the credentials provider creates the login info with the identifier entered in the form. For some cases this may not be enough. It could also be possible that a login form allows a user to log in with either a username or an email address. In this case this method should be overridden to provide a unique binding, like the user ID, for the entered form values.

    credentials

    The credentials to authenticate with.

    returns

    The login info created from the credentials.

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. val passwordHasherRegistry: PasswordHasherRegistry

    The password hashers used by the application.

    The password hashers used by the application.

    Attributes
    protected
    Definition Classes
    CredentialsProviderPasswordProvider
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. case object Authenticated extends State with Product with Serializable

    Indicates that the authentication was successful.

    Indicates that the authentication was successful.

    Definition Classes
    PasswordProvider

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 PasswordProvider

Inherited from Provider

Inherited from AnyRef

Inherited from Any

Ungrouped