module ApiAuth::Rails::ActiveResourceExtension::ActiveResourceApiAuth::ClassMethods
Public Instance Methods
connection_with_auth(refresh = false)
click to toggle source
# File lib/api_auth/railtie.rb, line 46 def connection_with_auth(refresh = false) c = connection_without_auth(refresh) c.hmac_access_id = hmac_access_id c.hmac_secret_key = hmac_secret_key c.use_hmac = use_hmac c.api_auth_options = api_auth_options c end
with_api_auth(access_id, secret_key, options = {})
click to toggle source
# File lib/api_auth/railtie.rb, line 34 def with_api_auth(access_id, secret_key, options = {}) self.hmac_access_id = access_id self.hmac_secret_key = secret_key self.use_hmac = true self.api_auth_options = options class << self alias_method :connection_without_auth, :connection alias_method :connection, :connection_with_auth end end