Class: CosmosAuthentication::RackMiddleware
- Inherits:
-
Object
- Object
- CosmosAuthentication::RackMiddleware
- Defined in:
- lib/cosmos_authentication/rack_middleware.rb
Defined Under Namespace
Classes: Authenticator
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, opts = {}) ⇒ RackMiddleware
constructor
A new instance of RackMiddleware.
Constructor Details
#initialize(app, opts = {}) ⇒ RackMiddleware
Returns a new instance of RackMiddleware.
127 128 129 130 |
# File 'lib/cosmos_authentication/rack_middleware.rb', line 127 def initialize(app, opts = {}) @app = app @opts = opts end |
Instance Method Details
#call(env) ⇒ Object
132 133 134 135 |
# File 'lib/cosmos_authentication/rack_middleware.rb', line 132 def call(env) env['authentication'] = Authenticator.new(@opts, env) @app.call env end |