Skip to content

Instantly share code, notes, and snippets.

@danielevans
Last active December 10, 2015 22:59

Revisions

  1. danielevans revised this gist Jan 10, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion application.rb
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,6 @@

    {
    "admin1" => "password1",
    "admin2" => "password2",
    "admin2" => "password2"
    }[username] == password
    end
  2. danielevans revised this gist Jan 10, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion application.rb
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@
    # simple sinatra auth
    use Rack::Auth::Basic, "Restricted Area" do |username, password|
    [username, password] == ['admin', 'admin']

    {
    "admin1" => "password1",
    "admin2" => "password2",
    }[username] == password
    end
  3. @atmosx atmosx created this gist Jan 10, 2013.
    4 changes: 4 additions & 0 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # simple sinatra auth
    use Rack::Auth::Basic, "Restricted Area" do |username, password|
    [username, password] == ['admin', 'admin']
    end