Sha256: b9c562b75adde8a8d6f85329d81c89eaec578d29fea59c4c87bcba0114bf575d
Contents?: true
Size: 1.69 KB
Versions: 6
Compression:
Stored size: 1.69 KB
Contents
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/wwidea/minimalist_authentication) MinimalistAuthentication ======================== 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. Installation ============ 1) Add to your Gemfile: gem 'minimalist_authentication' 2) Create a user model: ruby script/rails generate model user active:boolean email:string crypted_password:string salt:string using_digest_version:integer last_logged_in_at:datetime Example ======= 1) app/models/user.rb class User < ActiveRecord::Base include Minimalist::Authentication end 2) app/controllers/application.rb 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 3) app/controllers/sessions_controller.rb class SessionsController < ApplicationController include Minimalist::Sessions skip_before_filter :authorization_required, :only => [:new, :create] end 4) test/test_helper.rb class Test::Unit::TestCase include Minimalist::TestHelper end Copyright (c) 2009 Aaron Baldwin, released under the MIT license
Version data entries
6 entries across 6 versions & 1 rubygems