Skip to content
Authentication module for sinatra and some auth helpers
Branch: master
Clone or download
jsmestad Merge pull request #19 from olleolleolle/transpec-2
Update to RSpec 3 and expect-style asserts
Latest commit a3caae2 Apr 23, 2018


A Sinatra module that provides authentication for your Sinatra application through Warden.


  require 'sinatra'
  require 'sinatra_warden'

  class Application < Sinatra::Base
    register Sinatra::Warden

    get '/admin' do
      authorize!('/login') # require session, redirect to '/login' instead of work
      haml :admin

    get '/dashboard' do
      authorize! # require a session for this action
      haml :dashboard

More Information

Please read the wiki for more information on more advanced configurations.

Note on Patches/Pull Requests

  $ git clone git://
  $ cd sinatra_warden
  $ bundle install
  $ bundle exec rake
  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history.
  • Send me a pull request. Bonus points for topic branches.



Copyright (c) 2009-2017 Justin Smestad. See LICENSE for details.

You can’t perform that action at this time.