Skip to content

cail/authlogic_mongomapper_monkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Authlogic+MongoMapper monkey

This rails plugin is a set of patches both to authlogic and mongomapper to make them work together.

Part of these patches is jnunemaker-validatable fixes (required by authlogic)

Also this plugin tries to adapt authlogic_openid automatically (if found)

Install

Just do:

$ script/plugin install git://github.com/cail/authlogic_mongomapper_monkey.git

Usage

Draft and unstable! Use on your own risk.

Install and just follow authlogic guides for model and session definition.

Of course, model should be defined as a MongoMapper::Document, all the attributes required by authlogic should be defined in mongomapper style, like:

key :name, String
key :email, String
key :crypted_password, String
key :password_salt, String
key :persistence_token, String
key :single_access_token, String
key :perishable_token, String
key :login_count, Integer, :default => 0, :null => false
key :failed_login_count, Integer, :default => 0, :null => false
key :last_request_at, Time
key :current_login_at, Time
key :last_login_at, Time
key :current_login_ip, String
key :last_login_ip, String
# created_at, updated_at, helpers
timestamps!

Since authlogic depends on model attributes, only after above key definitions do

acts_as_authentic

and use any of authlogic configuration stuff

Resources

Project Site

Credits

Igor Russkih, released under the MIT license

About

Monkey patches for authlogic to work with mongomapper and vice versa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages