Class: GoogleContacts::Auth
- Inherits:
-
Object
- Object
- GoogleContacts::Auth
- Defined in:
- lib/google_contacts/auth.rb
Constant Summary collapse
- GOOGLE_OAUTH =
{ :site => "https://www.google.com", :request_token_path => "/accounts/OAuthGetRequestToken", :authorize_path => "/accounts/OAuthAuthorizeToken", :access_token_path => "/accounts/OAuthGetAccessToken", }.freeze
Class Attribute Summary collapse
-
.callback_url ⇒ Object
Returns the value of attribute callback_url.
-
.consumer_key ⇒ Object
Returns the value of attribute consumer_key.
-
.consumer_secret ⇒ Object
Returns the value of attribute consumer_secret.
Class Method Summary collapse
Instance Method Summary collapse
Class Attribute Details
.callback_url ⇒ Object
Returns the value of attribute callback_url.
13 14 15 |
# File 'lib/google_contacts/auth.rb', line 13 def callback_url @callback_url end |
.consumer_key ⇒ Object
Returns the value of attribute consumer_key.
11 12 13 |
# File 'lib/google_contacts/auth.rb', line 11 def consumer_key @consumer_key end |
.consumer_secret ⇒ Object
Returns the value of attribute consumer_secret.
12 13 14 |
# File 'lib/google_contacts/auth.rb', line 12 def consumer_secret @consumer_secret end |
Class Method Details
.consumer ⇒ Object
16 17 18 |
# File 'lib/google_contacts/auth.rb', line 16 def self.consumer ::OAuth::Consumer.new(consumer_key, consumer_secret, GOOGLE_OAUTH) end |
Instance Method Details
#request_token(options) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/google_contacts/auth.rb', line 20 def request_token() self.class.consumer.get_request_token({ :oauth_callback => [:callback] }, { :scope => "http://www.google.com/m8/feeds/" }) end |