lib/oauth/models/consumers/services/google_token.rb in oauth-plugin-0.4.0.pre4 vs lib/oauth/models/consumers/services/google_token.rb in oauth-plugin-0.4.0.pre5
- old
+ new
@@ -1,27 +1,21 @@
-require 'portablecontacts'
-
class GoogleToken < ConsumerToken
GOOGLE_SETTINGS={
- :site=>"https://www.google.com",
+ :site=>"https://www.google.com",
:request_token_path => "/accounts/OAuthGetRequestToken",
:authorize_path => "/accounts/OAuthAuthorizeToken",
:access_token_path => "/accounts/OAuthGetAccessToken",
}
-
+
def self.consumer
@consumer||=create_consumer
- end
-
+ end
+
def self.create_consumer(options={})
OAuth::Consumer.new credentials[:key],credentials[:secret],GOOGLE_SETTINGS.merge(options)
end
-
+
def self.get_request_token(callback_url, scope=nil)
consumer.get_request_token({:oauth_callback=>callback_url}, :scope=>scope||credentials[:scope]||"http://www-opensocial.googleusercontent.com/api/people")
end
-
- def portable_contacts
- @portable_contacts||= PortableContacts::Client.new "http://www-opensocial.googleusercontent.com/api/people", client
- end
-
-end
\ No newline at end of file
+
+end