module Xero::Api::Connection::OAuth1
Public Class Methods
included(*)
click to toggle source
Calls superclass method
# File lib/xero/api/connection/oauth1.rb, line 13 def self.included(*) Xero::Api::Connection.add_authorization_middleware :oauth1 super end
Public Instance Methods
default_attributes()
click to toggle source
Calls superclass method
# File lib/xero/api/connection/oauth1.rb, line 18 def default_attributes super.merge!( token: nil, token_secret: nil, consumer_key: defined?(CONSUMER_KEY) ? CONSUMER_KEY : nil, consumer_secret: defined?(CONSUMER_SECRET) ? CONSUMER_SECRET : nil, ) end
use_oauth1_middleware?()
click to toggle source
# File lib/xero/api/connection/oauth1.rb, line 32 def use_oauth1_middleware? token != nil end
Private Instance Methods
oauth_data()
click to toggle source
Use with simple_oauth OAuth1
middleware @see add_authorization_middleware
# File lib/xero/api/connection/oauth1.rb, line 40 def oauth_data { consumer_key: @consumer_key, consumer_secret: @consumer_secret, token: @token, token_secret: @token_secret } end