Packages

class BasicAuthProvider extends RequestProvider with PasswordProvider with api.Logger

A request provider implementation which supports HTTP basic authentication.

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.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BasicAuthProvider
  2. Logger
  3. PasswordProvider
  4. ExecutionContextProvider
  5. RequestProvider
  6. Provider
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BasicAuthProvider(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
    BasicAuthProviderPasswordProvider
  6. def authenticate[B](request: Request[B]): Future[Option[LoginInfo]]

    Authenticates an identity based on credentials sent in a request.

    Authenticates an identity based on credentials sent in a request.

    B

    The type of the body.

    request

    The request.

    returns

    Some login info on successful authentication or None if the authentication was unsuccessful.

    Definition Classes
    BasicAuthProviderRequestProvider
  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
    BasicAuthProviderExecutionContextProvider
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. def getCredentials(request: RequestHeader): Option[Credentials]

    Encodes the credentials.

    Encodes the credentials.

    request

    Contains the colon-separated name-value pairs in clear-text string format

    returns

    The users credentials as plaintext

  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  15. def id: String

    Gets the provider ID.

    Gets the provider ID.

    returns

    The provider ID.

    Definition Classes
    BasicAuthProviderProvider
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val logger: api.Logger

    A named logger instance.

    A named logger instance.

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

    The password hashers used by the application.

    The password hashers used by the application.

    Attributes
    protected
    Definition Classes
    BasicAuthProviderPasswordProvider
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. 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 api.Logger

Inherited from PasswordProvider

Inherited from RequestProvider

Inherited from Provider

Inherited from AnyRef

Inherited from Any

Ungrouped