merbful_authentication
=================
This is a port of the rails plugin "restful_authentication" by Rick Olson to the Merb Web Framework.
It is currently very freshly ported. Please report any bugs / patches to
has.sox /at/ gmail /dot/ com
You can find the original at http://svn.techno-weenie.net/projects/plugins/restful_authentication/
To use:
./script/generate authenticated user sessions \
--include-activation
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
site.
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.
=== Currently supported ORMs
Active Record
Datamapper
=== Required Routes
At the moment this version of the plugin requires some named routes
In config/router.rb
r.resources :users
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)
Note:
When using activation don't forget to setup your mailer.
Copyright of original project
Copyright (c) 2005 Rick Olson
Unless noted specifically, all plugins in this repository are MIT licensed:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=======