Module: Sorcery::Controller::Submodules::External::Protocols::Oauth1

Included in:
Sorcery::Controller::Submodules::External::Providers::Twitter::TwitterClient
Defined in:
lib/sorcery/controller/submodules/external/protocols/oauth1.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) authorize_url(args)



17
18
19
# File 'lib/sorcery/controller/submodules/external/protocols/oauth1.rb', line 17

def authorize_url(args)
  get_request_token(args[:request_token],args[:request_token_secret]).authorize_url(:oauth_callback => @callback_url)
end

- (Object) get_access_token(args)



21
22
23
# File 'lib/sorcery/controller/submodules/external/protocols/oauth1.rb', line 21

def get_access_token(args)
  get_request_token(args[:request_token],args[:request_token_secret]).get_access_token(:oauth_verifier => args[:oauth_verifier])
end

- (Object) get_request_token(token = nil, secret = nil)



12
13
14
15
# File 'lib/sorcery/controller/submodules/external/protocols/oauth1.rb', line 12

def get_request_token(token=nil,secret=nil)
  return ::OAuth::RequestToken.new(get_consumer,token,secret) if token && secret
  get_consumer.get_request_token(:oauth_callback => @callback_url)
end

- (Object) oauth_version



8
9
10
# File 'lib/sorcery/controller/submodules/external/protocols/oauth1.rb', line 8

def oauth_version
  "1.0"
end