Sha256: 5777faf58a8f555bd845023276c8f47ce78c66b2f1089bf641e47260c5cc4b77

Contents?: true

Size: 753 Bytes

Versions: 8

Compression:

Stored size: 753 Bytes

Contents

require 'omniauth/oauth'

module Orkut
  module Connection
  private

    def connection(options={})
      access_token = nil
      if authenticated?
        client_options = {
          :site => site,
          :request_token_path => request_token_path,
          :access_token_path => access_token_path,
          :authorize_path => authorize_path
        }
        consumer = ::OAuth::Consumer.new(consumer_key, consumer_secret, client_options)
        # now create the access token object from passed values
        token_hash = { :oauth_token => oauth_token,
          :oauth_token_secret => oauth_token_secret
        }
        access_token = ::OAuth::AccessToken.from_hash(consumer, token_hash)
      end
      access_token
    end
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
orkut-0.0.0.8 lib/orkut/connection.rb
orkut-0.0.0.7 lib/orkut/connection.rb
orkut-0.0.0.6 lib/orkut/connection.rb
orkut-0.0.0.5 lib/orkut/connection.rb
orkut-0.0.0.4 lib/orkut/connection.rb
orkut-0.0.0.3 lib/orkut/connection.rb
orkut-0.0.0.2 lib/orkut/connection.rb
orkut-0.0.0.1 lib/orkut/connection.rb