play.modules.authenticator

Authenticator

Related Doc: package authenticator

trait Authenticator extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Authenticator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def authenticateWithOpenID(openid: String, callback: Call, axRequired: Seq[(String, String)] = Seq.empty, axOptional: Seq[(String, String)] = Seq.empty, realm: Option[String] = None)(implicit request: Request[AnyContent]): Future[Result]

    Authenticate a principal using its openid

    Authenticate a principal using its openid

    The future this function return might fail if the openid authentication process fails at retrieving the redirect URL. You should handle this failure properly.

  2. abstract def authenticateWithPassword(name: String, pass: String)(res: (Option[Principal]) ⇒ Future[(Boolean, Result)])(implicit request: Request[AnyContent]): Future[Result]

    Authenticate a principal using its username and password

    Authenticate a principal using its username and password

    When the authentication try is evaluated the res function is called with either the now authenticated Principal or None.

    authenticator.authenticateWithPassword("user", "password") {
      case Some(princ) ¬ヌメ Future.successful((true, Ok("You are now logged in.")))
      case None ¬ヌメ Future.successful((false, Ok("Authentication failure.")))
    }

    The boolean return value of res can be used to prevent a login even though the credentials are correct which might be of use for deactivating accounts.

  3. abstract def openIDCallback(res: (Option[Principal], Option[String], Map[String, String]) ⇒ Future[(Boolean, Result)])(implicit request: Request[AnyContent]): Future[Result]

    Callback for openid

    Callback for openid

    If the openID is valid and a principal is found a Some[Principal] and Some[String] (the valid openID) is passed to res. If the openID is valid but no principal can be found None and Some[String] is passed to res. If the openID is invalid None and None is passed to res. The third parameter contains a map of the exchange attributes.

    The boolean return value of res can be used to prevent a login even though the credentials are correct.

    When the principal is not existing but the openID is valid res should trigger some kind of application specific registration process.

  4. abstract def principal()(implicit request: Request[AnyContent]): Future[Option[Principal]]

    Get the currently authed principal

  5. abstract def principals: PrincipalController

    Controller to retrieve, save, and create principals

    Controller to retrieve, save, and create principals

    This controller is used to manage creation of principal objects.

  6. abstract def unauthenticate(result: Result)(implicit request: Request[AnyContent]): Future[Result]

    Unauthenticate a principal

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

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

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

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  16. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped