Class: UU::OS::Application::AuthenticationMiddleware

Inherits:
Server::AbstractMiddleware show all
Defined in:
uu_os_application-server-2.7.3/lib/uu/os/application/authentication_middleware.rb

Constant Summary

REQ_PARAM_ACCESS_TOKEN =
"uuAT"

Instance Method Summary (collapse)

Constructor Details

- (AuthenticationMiddleware) initialize(app)

Returns a new instance of AuthenticationMiddleware



31
32
33
# File 'uu_os_application-server-2.7.3/lib/uu/os/application/authentication_middleware.rb', line 31

def initialize(app)
  super(app)
end

Instance Method Details

- (Object) call(env)



35
36
37
38
39
40
41
42
43
# File 'uu_os_application-server-2.7.3/lib/uu/os/application/authentication_middleware.rb', line 35

def call(env)
  request = UU::OS::Server::Request.new(env)
  begin
    do_authentication(request)
    @app.call(env)
  ensure
    UU::OS::Security::Session.logout(true)
  end
end