Autentificación Básica en Sinatra con Rack::Auth::Basic

[~/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



Casiano Rodriguez León 2015-01-07