def call(env)
      now              = Time.now.to_i
      session          = env['rack.session']
      window_size      = window_size(env)
      previous_timeout = session['aker.last_request_at']

      return @app.call(env) unless window_size > 0

      env['aker.timeout_at'] = now + window_size
      session['aker.last_request_at'] = now

      return @app.call(env) unless previous_timeout

      if now >= previous_timeout + window_size
        env['aker.session_expired'] = true
        env['warden'].logout
      end
      @app.call(env)
    end
def call(env)
      now              = Time.now.to_i
      session          = env['rack.session']
      window_size      = window_size(env)
      previous_timeout = session['aker.last_request_at']

      return @app.call(env) unless window_size > 0

      env['aker.timeout_at'] = now + window_size
      session['aker.last_request_at'] = now

      return @app.call(env) unless previous_timeout

      if now >= previous_timeout + window_size
        env['aker.session_expired'] = true
        env['warden'].logout
      end
      @app.call(env)
    end
Determines whether the incoming request arrived within the timeout
 window.  If it did, then the request is passed onto the rest of the Rack
 stack; otherwise, the user is redirected to the configured
 logout path.