Class: Weary::Middleware::HMACAuth
- Inherits:
-
Object
- Object
- Weary::Middleware::HMACAuth
- Defined in:
- lib/weary/middleware/hmac_auth.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, config = {}) ⇒ HMACAuth
constructor
A new instance of HMACAuth.
Constructor Details
#initialize(app, config = {}) ⇒ HMACAuth
Returns a new instance of HMACAuth.
7 8 9 10 11 |
# File 'lib/weary/middleware/hmac_auth.rb', line 7 def initialize(app, config = {}) @app = app @access_id = config[:access_id] @secret_key = config[:secret_key] end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 |
# File 'lib/weary/middleware/hmac_auth.rb', line 13 def call(env) set_content_type! env sign! env @app.call env end |