At the moment there is support for Datamapper and Activerecord ORM's. Hopefully Sequel will follow soon.
How to get itThe gem has been released on rubiforge, so the usual should do the trick
sudo gem install merbful_authenticationIf you want source with that.
git clone git://activereload.net/restful_authentication.git merbful_authentication.gitOr SVN
git checkout -b local/merbful_authetication origin/merbful_authentication
svn co svn://rubyforge.org/var/svn/merbful-authFrom either of these you can package and install the gem
sudo gem install pkg/merbful_authentication-0.1.0.gem
UsageIt has the same usage as restful_authentication, without the stateful stuff. So (from README)
./script/generate authenticated user sessions \
The first parameter specifies the model that gets created in signup
(typically a user or account model). A model with migration is
created (if migrations are available), as well as a basic controller with the create method.
The second parameter specifies the sessions controller name. This is
the controller that handles the actual login/logout function on the
The third parameter (--include-activation) generates the code for a
Mailer and the required support code. Don't forget to setup your mailer for this.
Required SetupUnfortunately there is some setup required. At the moment, some named routes are required. You can set these up in you config/router.rb
r.resources :usersThat last one is only required if you include activation. Don't forget to setup your mailer configs if your using it too.
r.match("/login").to(:controller => "Sessions", :action => "create").name(:login)
r.match("/logout").to(:controller => "Sessions", :action => "destroy").name(:logout)
r.match("/users/activate/:activation_code").to(:controller => "Users", :action => "activate").name(:user_activation)
Also, you need to have merb_helpers installed. This is for the form generation stuff. In config/dependencies.rb
dependency "merb_helpers"All crit, comments, bug reports, patches are welcome. Patches are more welcome of course ;)
Update: You will need to install merb and merb_helpers from trunk until the official 0.5 gem for merb comes out.