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: Map[String, String] = Map.empty,
  axOptional: Map[String, String] = Map.empty,
  realm: Option[String] = None)
providerURLThe OpenID provider URL used if no openID was given
callbackURLThe 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
axRequiredRequired attributes to return from the provider after a successful authentication
axOptionalOptional attributes to return from the provider after a successful authentication
realmOpenID 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:



steam {

yahoo {
    "fullname": "",
    "email": "",
    "image": ""

Override the configuration locally

Basically the configuration of the providers will be done globally on provider instantiation. But in some circumstances it is necessary to override this globally configuration with other values. This can be done with the withSettings method that every SocialProvider has implemented. The withSettings methods accepts a function which gets the current configuration as parameter and which must return a new configuration.

provider.withSettings { config =>

What’s Next