Class: TentClient::Middleware::MacAuth
- Inherits:
-
Object
- Object
- TentClient::Middleware::MacAuth
- Defined in:
- lib/tent-client/middleware/mac_auth.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ MacAuth
constructor
A new instance of MacAuth.
Constructor Details
#initialize(app, options = {}) ⇒ MacAuth
Returns a new instance of MacAuth.
8 9 10 |
# File 'lib/tent-client/middleware/mac_auth.rb', line 8 def initialize(app, ={}) @app, @mac_key_id, @mac_key, @mac_algorithm = app, [:mac_key_id], [:mac_key], [:mac_algorithm] end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 |
# File 'lib/tent-client/middleware/mac_auth.rb', line 12 def call(env) sign_request(env) if auth_enabled? @app.call(env) end |