OAuth1 based providers
To configure OAuth1 based providers you must use the OAuth1Settings
class. This class has the following form:
case class OAuth1Settings(
requestTokenURL: String,
accessTokenURL: String,
authorizationURL: String,
callbackURL: String,
consumerKey: String,
consumerSecret: String)
Property | Description |
---|---|
requestTokenURL | The request token URL provided by the OAuth provider |
accessTokenURL | The access token URL provided by the OAuth provider |
authorizationURL | The authorization URL provided by the OAuth provider |
callbackURL | The callback URL to the application after a successful authentication on the OAuth provider. The URL can be a relative path which will be resolved against the current request's host |
consumerKey | The consumer ID provided by the OAuth provider |
consumerSecret | The consumer secret provided by the OAuth provider |
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/linkedin"
Example
linkedin {
requestTokenURL="https://api.linkedin.com/uas/oauth/requestToken"
accessTokenURL="https://api.linkedin.com/uas/oauth/accessToken"
authorizationURL="https://api.linkedin.com/uas/oauth/authenticate"
callbackURL="https://your.domain.tld/authenticate/linkedin"
consumerKey="your.consumer.key"
consumerSecret="your.consumer.secret"
}
twitter {
requestTokenURL="https://twitter.com/oauth/request_token"
accessTokenURL="https://twitter.com/oauth/access_token"
authorizationURL="https://twitter.com/oauth/authenticate"
callbackURL="https://your.domain.tld/authenticate/twitter"
consumerKey="your.consumer.key"
consumerSecret="your.consumer.secret"
}
xing {
requestTokenURL="https://api.xing.com/v1/request_token"
accessTokenURL="https://api.xing.com/v1/access_token"
authorizationURL="https://api.xing.com/v1/authorize"
callbackURL="https://your.domain.tld/authenticate/xing"
consumerKey="your.consumer.key"
consumerSecret="your.consumer.secret"
}
To get the consumerKey/consumerSecret keys you need to log into the developer site of each service and register your application.
Updated less than a minute ago