A Rails authentication gem that takes a minimalist approach. It is designed to be simple to understand, use, and modify for your application.
This gem was largely inspired by the restful-authentication plugin (http://github.com/technoweenie/restful-authentication/tree/master). I selected the essential methods for password based authentication, reorganized them, trimmed them down when possible, added a couple of features, and resisted the urge to start adding more.
1) Add to your Gemfile:
2) Create a user model:
bin/rails generate model user active:boolean email:string crypted_password:string salt:string using_digest_version:integer last_logged_in_at:datetime
class User < ActiveRecord::Base include Minimalist::Authentication end
class ApplicationController < ActionController::Base include Minimalist::Authorization # Lock down everything by default # use skip_before_filter to open up sepecific actions prepend_before_filter :authorization_required end
class SessionsController < ApplicationController include Minimalist::Sessions skip_before_filter :authorization_required, only: [:new, :create] end
class ActiveSupport::TestCase include Minimalist::TestHelper end
Copyright (c) 2009 Aaron Baldwin, released under the MIT license