Sample framework for basic authentication in Sinatra with DataMapper
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with codebiff:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
views
.gitignore
Gemfile
Gemfile.lock
README.markdown
config.ru
helpers.rb
models.rb
routes.rb

README.markdown

Sinatra Authentication Framework

Basics

Clone it. Add to it. Make it better. Add some routes. Use the helpers.

Helpers

	current_user				#=> Returns current logged in user
	login_required				#=> Checks if a user is logged in
	admin_required				#=> Checks if user is an admin
	is_owner? :id				#=> Checks if logged in user has same id as requested