These docs are for v2.0. Click to read the latest docs for v7.0.

OpenID based providers

To configure OpenID based providers you must use the OpenIDSettings class. This class has the following form:

case class OpenIDSettings(
  providerURL: String,
  callbackURL: String,
  axRequired: Seq[(String, String)] = Seq.empty,
  axOptional: Seq[(String, String)] = Seq.empty,
  realm: Option[String] = None)

Property

Description

providerURL

The OpenID provider URL used if no openID was given

callbackURL

The callback URL to the application after a successful authentication on the OpenID provider. The URL can be a relative path which will be resolved against the current request's host

axRequired

Required attributes to return from the provider after a successful authentication

axOptional

Optional attributes to return from the provider after a successful authentication

realm

OpenID Authentication request is valid

Callback URL

The callbackURL must point to your action which is responsible for the authentication over your defined providers. So if you define the following route as example:

GET  /authenticate/:provider  @controllers.SocialAuthController.authenticate(provider)

Then your callbackURL must have the following format:

callbackURL="https://your.domain.tld/authenticate/yahoo"

Example

steam {
  providerURL="https://steamcommunity.com/openid/"
  callbackURL="https://your.domain.tld/authenticate/steam"
  realm="https://your.domain.tld"
}

yahoo {
  providerURL="https://me.yahoo.com/"
  callbackURL="https://your.domain.tld/authenticate/yahoo"
  axRequired={
    "fullname": "http://axschema.org/namePerson",
    "email": "http://axschema.org/contact/email",
    "image": "http://axschema.org/media/image/default"
  }
  realm="https://your.domain.tld"
}