com.mle.play.openid

OpenIdAuth

trait OpenIdAuth extends Log

OpenID authentication. Only Google is supported for now. Usage:

Set a route in your routes file that leads to the handleOpenId method. For example:

GET  /oid  controllers.App.handleOpenId

Set another route that leads to the openIdCallback method, for example:

GET  /openidcb  controllers.App.openIdCallback

Define the openIdCallbackRoute of this trait to the route you specified:

protected def openIdCallbackRoute = routes.App.openIdCallback()

To start authentication, send the user to the OpenID route you first defined:

Redirect(routes.App.handleOpenId())

The authenticated email address is stored in the username session variable.

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

Abstract Value Members

  1. abstract def isAuthorized(email: String): Boolean

    email

    email to validate

    returns

    true if the email is authorized to sign in, false otherwise

  2. abstract def onOpenIdFailure: Result

    Suggestion: redirect to an error page with an error message.

  3. abstract def openIdCallbackRoute: Call

    returns

    routes.YourPlayController.openIdCallback

    Attributes
    protected
  4. abstract def successRedirect: Call

    Implement something like: routes.Controller.homePage()

    Implement something like: routes.Controller.homePage()

    returns

    the place to go after the user is successfully authenticated

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 handleOpenId: Action[AnyContent]

  11. def handleOpenIdFailure(ex: Throwable, request: RequestHeader): Result

    Called if the OpenID authentication process fails.

    Called if the OpenID authentication process fails.

    Note that this is not called if the authorization fails; see onOpenIdUnauthorized(UserInfo) in that case.

    Attributes
    protected
  12. def hashCode(): Int

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

    Definition Classes
    Any
  14. val log: Logger

    Attributes
    protected
    Definition Classes
    Log
  15. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  18. def onOpenIdUnauthorized(userInfo: UserInfo): Result

    Called if the user has successfully authenticated, but is not authorized to access the resource/site.

    Called if the user has successfully authenticated, but is not authorized to access the resource/site.

    userInfo

    authenticated user

    returns

    the result

  19. def openIdCallback: Action[AnyContent]

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. def userString(user: UserInfo): String

  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Log

Inherited from AnyRef

Inherited from Any

Ungrouped