Class/Object

com.mohiva.play.silhouette.impl.providers

BasicAuthProvider

Related Docs: object BasicAuthProvider | package providers

Permalink

class BasicAuthProvider extends RequestProvider with PasswordProvider with 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.

Linear Supertypes
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. All

Instance Constructors

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    The authentication state.

    The authentication state.

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

    Permalink

    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

    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. object Authenticated extends State with Product with Serializable

    Permalink

    Indicates that the authentication was successful.

    Indicates that the authentication was successful.

    Definition Classes
    PasswordProvider
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. val authInfoRepository: AuthInfoRepository

    Permalink

    The auth info repository.

    The auth info repository.

    Attributes
    protected
    Definition Classes
    BasicAuthProviderPasswordProvider
  7. def authenticate[B](request: Request[B]): Future[Option[LoginInfo]]

    Permalink

    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
  8. def authenticate(loginInfo: LoginInfo, password: String): Future[State]

    Permalink

    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
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. implicit val executionContext: ExecutionContext

    Permalink

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    BasicAuthProviderExecutionContextProvider
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getCredentials(request: RequestHeader): Option[Credentials]

    Permalink

    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

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def id: String

    Permalink

    Gets the provider ID.

    Gets the provider ID.

    returns

    The provider ID.

    Definition Classes
    BasicAuthProviderProvider
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. val logger: Logger

    Permalink

    A named logger instance.

    A named logger instance.

    Definition Classes
    Logger
  20. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  23. val passwordHasherRegistry: PasswordHasherRegistry

    Permalink

    The password hashers used by the application.

    The password hashers used by the application.

    Attributes
    protected
    Definition Classes
    BasicAuthProviderPasswordProvider
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

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

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

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

Inherited from Logger

Inherited from PasswordProvider

Inherited from ExecutionContextProvider

Inherited from RequestProvider

Inherited from Provider

Inherited from AnyRef

Inherited from Any

Ungrouped