[~/srcSTW/sinatra-faq/authentication/basic(esau)]$ cat app.rb require 'rubygems' require 'sinatra' use Rack::Auth::Basic, "Restricted Area" do |username, password| [username, password] == ['admin', 'admin'] end get '/' do "You're welcome" end get '/foo' do "You're also welcome" end