def call(env) # :nodoc:
      return @app.call(env) if env['warden'] && env['warden'].manager != self

      env['warden'] = Proxy.new(env, self)
      result = catch(:warden) do
        @app.call(env)
      end

      result ||= {}
      case result
      when Array
        if result.first == 401 && intercept_401?(env)
          process_unauthenticated(env)
        else
          result
        end
      when Hash
        process_unauthenticated(env, result)
      end
    end
def call(env) # :nodoc:
      return @app.call(env) if env['warden'] && env['warden'].manager != self

      env['warden'] = Proxy.new(env, self)
      result = catch(:warden) do
        @app.call(env)
      end

      result ||= {}
      case result
      when Array
        if result.first == 401 && intercept_401?(env)
          process_unauthenticated(env)
        else
          result
        end
      when Hash
        process_unauthenticated(env, result)
      end
    end
Initialize the middleware. If a block is given, a Warden::Config is yielded so you can properly
 configure the Warden::Manager.
 :api: public
 Invoke the application guarding for throw :warden.
 If this is downstream from another warden instance, don't do anything.
 :api: private