Module: ApiAuth::Rails::ActiveResourceExtension::ActiveResourceApiAuth::ClassMethods
- Defined in:
- lib/api_auth/railtie.rb
Instance Method Summary collapse
- #connection_with_auth(refresh = false) ⇒ Object
- #with_api_auth(access_id, secret_key, options = {}) ⇒ Object
Instance Method Details
#connection_with_auth(refresh = false) ⇒ Object
46 47 48 49 50 51 52 53 |
# 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. = c end |
#with_api_auth(access_id, secret_key, options = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/api_auth/railtie.rb', line 34 def with_api_auth(access_id, secret_key, = {}) self.hmac_access_id = access_id self.hmac_secret_key = secret_key self.use_hmac = true self. = class << self alias_method :connection_without_auth, :connection alias_method :connection, :connection_with_auth end end |