class

SimpleOAuth::Consumer

Inherits Reference < Object

Constructors

new(consumer_key : String, consumer_secret : String, callback_url : String)

Creates a new Consumer with the specified credentials.

Source

Class methods

authenticate_url(request_token : String)

Returns the /authenticate URL with the OAuth Request Token passed as query string parameter. This is used in Step 2 of the 3-legged OAuth flow.

Source

Instance methods

get_token

Allows a Consumer application to obtain an OAuth Request Token to request user authorization.

Returns a TokenPair representing the OAuth Request Token data.

Source
upgrade_token(token : TokenPair, verifier : String) : TokenPair

Converts the OAuth Request Token into an OAuth Access Token that can be used to call the API on the users' behalf. This method uses both the consumer secret and the resource owner secret to sign the request. OAuth providers like Twitter expect the token's oauth_token_secret to be an empty string.

Returns a TokenPair representing the OAuth Access Token data.

Source

Nested types