Class: FlyingSphinx::Request::HMAC
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- FlyingSphinx::Request::HMAC
- Defined in:
- lib/flying_sphinx/request/hmac.rb
Instance Method Summary collapse
- #call(environment) ⇒ Object
-
#initialize(app, identifier, api_key, service) ⇒ HMAC
constructor
A new instance of HMAC.
Constructor Details
#initialize(app, identifier, api_key, service) ⇒ HMAC
Returns a new instance of HMAC.
2 3 4 5 6 7 8 |
# File 'lib/flying_sphinx/request/hmac.rb', line 2 def initialize(app, identifier, api_key, service) super app @identifier = identifier @api_key = api_key @service = service end |
Instance Method Details
#call(environment) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/flying_sphinx/request/hmac.rb', line 10 def call(environment) Ey::Hmac.sign! environment, identifier, api_key, :adapter => Ey::Hmac::Adapter::Faraday, :service => service app.call environment end |