public
Description: A thin rails plugin on top of Warden for Authentication
Homepage:
Clone URL: git://github.com/hassox/rails_warden.git
name age message
file .gitignore Wed Jun 10 05:21:13 -0700 2009 Bumps the version and adds a gitignore [hassox]
file LICENSE Wed Jun 03 08:01:48 -0700 2009 Initial Commit [hassox]
file README.textile Wed Jun 03 19:11:22 -0700 2009 Readme touch up [hassox]
file Rakefile Tue Sep 08 21:59:25 -0700 2009 Fixes a bug in the logout method. Thanks dkubb [hassox]
file TODO Wed Jun 03 08:01:48 -0700 2009 Initial Commit [hassox]
file VERSION Mon Dec 07 03:59:49 -0800 2009 Updates rails warden to the new serializer type [hassox]
directory lib/ Mon Dec 07 03:59:49 -0800 2009 Updates rails warden to the new serializer type [hassox]
file rails_warden.gemspec Mon Dec 07 03:59:49 -0800 2009 Updates rails warden to the new serializer type [hassox]
directory script/ Wed Jun 03 08:01:48 -0700 2009 Initial Commit [hassox]
directory spec/ Mon Nov 16 20:44:42 -0800 2009 Updates to fix issue 3. Thanx vandrijevik (Vla... [hassox]
README.textile

Rails Warden

Provides authentication for Rails applications via the Warden Rack authentication framework.

Require the gem:

config/environment.rb


  config.gem "rails_warden"

Setup an initializer:

config/initializers/warden.rb


  Rails.configuration.middleware.use RailsWarden::Manager do |manager|
    manager.default_strategies :my_strategy
    manager.failure_app = LoginController
  end

  # Setup Session Serialization
  Warden::Manager.serialize_into_session{ |user|      [user.class, user.id] }
  Warden::Manager.serialize_from_session{ |klass, id| klass.find(id)        }

  # Declare your strategies here
  #Warden::Strategies.add(:my_strategy) do
  #  def authenticate!
  #    # do stuff
  #  end
  #end