title: how to add Auth::Basic to simple Rack application
body: <p>how can I add this</p>
  
  <pre><code>use Rack::Auth::Basic do |username, password|
    username == 'pippo' &amp;&amp; password == 'pluto'
  end
  </code></pre>
  
  <p>to this</p>
  
  <pre><code>class HelloWorld
    def call(env)
      req = Rack::Request.new(env)
      case req.path_info
      when /badges/
        [200, {"Content-Type" =&gt; "text/html"},  ['This is great !!!!']]
      when /goodbye/
        [500, {"Content-Type" =&gt; "text/html"}, ["Goodbye Cruel World!"]]
      else
        [404, {"Content-Type" =&gt; "text/html"}, ["I'm Lost!"]]
      end
    end
  end
  
  
  run HelloWorld.new
  </code></pre>
  
  <p>I have this simple Rack application and I need to add Auth::Basic.</p>
  
  <p>Thanks </p>