abstract class SimpleOAuth::Consumer
- SimpleOAuth::Consumer
- Reference
- Object
Defined in:
simple_oauth/consumer.crConstructors
-
.new(consumer_key : String, consumer_secret : String, callback_url : String)
Creates a new
Consumer
with the specified credentials.
Class Method Summary
-
.authenticate_url(request_token : String)
Returns the
/authenticate
URL with the OAuth Request Token passed as query string parameter.
Instance Method Summary
-
#get_token : TokenPair
Allows a Consumer application to obtain an OAuth Request Token to request user authorization.
-
#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.
Constructor Detail
Creates a new Consumer
with the specified credentials.
Class Method Detail
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.
Instance Method Detail
Allows a Consumer application to obtain an OAuth Request Token to request user authorization.
Returns a TokenPair
representing the OAuth Request Token data.
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.