def call(env)
      configuration = configuration(env)
      warden = env['warden']

      if interactive?(env)
        warden.authenticate(configuration.ui_mode)
      else
        warden.authenticate(*configuration.api_modes)
      end

      env['aker.check'] = Facade.new(configuration, warden.user)

      @app.call(env)
    end
def call(env)
      configuration = configuration(env)
      warden = env['warden']

      if interactive?(env)
        warden.authenticate(configuration.ui_mode)
      else
        warden.authenticate(*configuration.api_modes)
      end

      env['aker.check'] = Facade.new(configuration, warden.user)

      @app.call(env)
    end
Authenticates incoming requests using Warden.

 Additionally, this class exposes the `aker.check` environment
 variable to downstream middleware and the app.  It is an
 instance of {Aker::Rack::Facade} permitting authentication and
 authorization queries about the current user (if any).