Class: Warden::AlwaysAuthenticate

Inherits:
Object
  • Object
show all
Defined in:
lib/warden/always_authenticate.rb,
lib/warden/always_authenticate/version.rb

Constant Summary collapse

VERSION =
'0.0.2'

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ AlwaysAuthenticate

Returns a new instance of AlwaysAuthenticate.



3
4
5
# File 'lib/warden/always_authenticate.rb', line 3

def initialize app
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
# File 'lib/warden/always_authenticate.rb', line 7

def call env
  env['warden'].authenticate!
  @app.call env
end