Skip to content

quackingduck-archive/sinatra-auth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple HTTP Basic auth for Sinatra

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%