Module: Xing::Helpers::Authorization
- Included in:
- Client
- Defined in:
- lib/xing/helpers/authorization.rb
Constant Summary collapse
- DEFAULT_OAUTH_OPTIONS =
{ :site => "https://api.xing.com", :request_token_path => "/v1/request_token", :authorize_path => "/v1/authorize", :access_token_path => "/v1/access_token" }
Instance Method Summary collapse
Instance Method Details
#access_token ⇒ Object
17 18 19 |
# File 'lib/xing/helpers/authorization.rb', line 17 def access_token @access_token ||= ::OAuth::AccessToken.new(consumer, @auth_token, @auth_secret) end |
#authorize_from_access(atoken, asecret) ⇒ Object
21 22 23 |
# File 'lib/xing/helpers/authorization.rb', line 21 def (atoken, asecret) @auth_token, @auth_secret = atoken, asecret end |
#consumer ⇒ Object
13 14 15 |
# File 'lib/xing/helpers/authorization.rb', line 13 def consumer @consumer ||= ::OAuth::Consumer.new(@consumer_token, @consumer_secret, DEFAULT_OAUTH_OPTIONS) end |