Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple HTTP Basic auth for Sinatra
Ruby
branch: master

This branch is 9 commits ahead, 4 commits behind integrity:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib/sinatra
.gitignore
README.md
Rakefile
VERSION

README.md

Simple authentication for Sinatra

Simplest case:

auth :password => 'p4ssw3rd'

Which is shorter than calling the rack middleware:

use Rack::Auth::Basic do |_, password|
  password == 'p4ssw3rd'
end

Also supports scoping:

auth '/admin',
  :username => 'myles',
  :password => 'p4ssw3rd'

... and some other options. See examples.rb

Something went wrong with that request. Please try again.