Project Summary

  Analyzed 5 days ago based on code collected 5 days ago.

Largely based on restful_authentication by Rick Olson. Changes include:

Bcrypt is used for password storage. Specified with RSpec. Authentication mechanisms are seperated into modules contained within the plugin. Generators are only used for migrations. Does not include email verification. This plugin does not generate controller code for you. Partly because I'm lazy and partly since example code (taken from restful_authentication) can be found in the resources directory of the plugins spec folder.

For a rationale on why SHA1 with individual salts is sub-par to bcrypt read Thomas Ptacek's article.

ExampleUsing acts_as_authentable is as easy as:

Installing bcrypt-ruby:

gem install bcrypt-rubyInstalling acts_as_authentable:

./script/plugin install http://acts-as-authentable.googlecode.com/svn/trunk/acts_as_authentableAnnotate the model object you want to be authentable:

class User < ActiveRecord::Base
acts_as_authentable
endCreating a migration for adding fields to the authentable model:

./script/generate authentable user

creates a migration:
db/migrate/XXX_add_authentable_fields_for_users.rbIf you have rspec and rspec_on_rails installed verify the plugin with:

rake spec:plugins

Share

In a Nutshell, acts-as-authentable...

 

Activity

30 Day Summary Apr 18 2013 — May 18 2013

12 Month Summary May 18 2012 — May 18 2013

Community

Ratings

Be the first to rate this project
 
Click to add your rating
 
Review this Project!
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.