Sha256: e337ba05cb0da30ec95648d337681f9818cf0d99a4b88d7665b7886965e4b555
Contents?: true
Size: 694 Bytes
Versions: 11
Compression:
Stored size: 694 Bytes
Contents
class GoogleToken < ConsumerToken GOOGLE_SETTINGS={ :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 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 end
Version data entries
11 entries across 11 versions & 3 rubygems