play.api.libs.oauth

Members list

Type members

Classlikes

case class ConsumerKey(key: String, secret: String)

A consumer key / consumer secret pair that the OAuth provider gave you, to identify your application.

A consumer key / consumer secret pair that the OAuth provider gave you, to identify your application.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class OAuth(info: ServiceInfo, use10a: Boolean)

Library to access resources protected by OAuth 1.0a.

Library to access resources protected by OAuth 1.0a.

Value parameters

info

the service information, including the required URLs and the application id and secret

use10a

whether the service should use the 1.0 version of the spec, or the 1.0a version fixing a security issue. You must use the version corresponding to the

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class OAuthCalculator(consumerKey: ConsumerKey, requestToken: RequestToken) extends WSSignatureCalculator, SignatureCalculator

The public AsyncHttpClient implementation of WSSignatureCalculator.

The public AsyncHttpClient implementation of WSSignatureCalculator.

Attributes

Companion
object
Supertypes
trait SignatureCalculator
trait WSSignatureCalculator
class Object
trait Matchable
class Any

Object for creating signature calculator for the Play WS API.

Object for creating signature calculator for the Play WS API.

Example:

import play.api.libs.oauth.{ ConsumerKey, OAuthCalculator, RequestToken }
import play.api.libs.ws.ahc.StandaloneAhcWSClient

def example(
 twitterConsumerKey: String,
 twitterConsumerSecret: String,
 accessTokenKey: String,
 accessTokenSecret: String,
 ws: StandaloneAhcWSClient) = {
 val consumerKey: ConsumerKey =
   ConsumerKey(twitterConsumerKey, twitterConsumerSecret)

 val requestToken: RequestToken =
   RequestToken(accessTokenKey, accessTokenSecret)

 ws.url("http://example.com/protected").
   sign(OAuthCalculator(consumerKey, requestToken)).get()
}

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
case class RequestToken(token: String, secret: String)

A request token / token secret pair, to be used for a specific user.

A request token / token secret pair, to be used for a specific user.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ServiceInfo(requestTokenURL: String, accessTokenURL: String, authorizationURL: String, key: ConsumerKey)

The information identifying a oauth provider: URLs and the consumer key / consumer secret pair.

The information identifying a oauth provider: URLs and the consumer key / consumer secret pair.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all