Topic: Restful Authentication with all the bells and whistles (new 9/05/08)
This is a new restful authentication tutorial based the lastest version of the plugin and edge rails as of 9/05/08. The original tutorial can be found at http://railsforum.com/viewtopic.php?pid=74245#p74245
The source code is now available on github.com at http://github.com/activefx/restful_auth ree/master Since this new tutorial will be less of a step by step instruction guide and more of an overview and description of the files in the application, I suggest you grab the app from github to work with. Currently the tutorial assumes a working knowledge of Git, however I'm almost done with a beginner's tutorial for Git if you don't have an understanding of it yet.
To set up the application from the source code on github, follow these instructions:
- git clone git://github.com/activefx/restful_authentication_tutorial.git
- cd restful_authentication_tutorial
- git submodule init
- git submodule update
- Set up database.yml file
- Set up config.yml file (repeat as necessary for test and production environments)
- Change the login and password for the admin user in the _set_up_first_admin_user.rb migration
- Change contact_site method in application.rb to redirect to your site's contact form or info
- rake db:create:all or db:create
- rake db:migrate
Current features include:
- Namespaced admin and user sections
- Login / Logout
- OpenID Authentication with support for incomplete OpenID profiles
- Roles and permissions
- Administrative user controller
- Set roles, activate, enable / disable users
- Member list and public profiles for logged in users
- Activation, with option to resend activation code
- Beta invitation system with easy on/off functionality
- Forgot Password / Reset Password
- Change Password
- Failed login attempts database logging
- Recaptcha displayed for more than 5 failed logins
- Helper methods (link_to_user, if_admin?, etc.)
- Configuration file
- 404 handling and database logging
- Yahoo User Interface 3 CSS template
- Nested layouts
- Authentication Plugins
- restful_authentication, open_id_authentication, role_requirement, recaptcha
- UI Plugins
- custom-err-msg, permalink_fu, uberkit, will_paginate
- Debug Plugins
- exception_logger, rails-footnotes, query_analyzer, query_stats, rows_logger
- Development Plugins
- auto_migrations
- Testing
- rspec, rspec_rails
This is a very preliminary release of the application and has not been fully tested or security audited. Please feel free to fork and improve, or message me with any feature requests, suggestions, bugs, fixes for the known issues, resources, etc. The Todo list in the readme is listed in order of urgency and I'm going to try and add those features to the application in that order.
There are couple of things you want to do to get started. Generate the rails application, initialize a git repository, install the restful_authentication, open_id_authentication, role_requirement, rspec, rspec_rails, and will_paginate plugins (the other plugins are optional), vendor edge rails, and run the generators for restful_authentication, open_id_authentication, role_requirement, and rspec. (Note that the sample app is locked to certain versions of the plugins and edge rails, so if you're working through the tutorial this way there is a chance everything won't work together properly.)
The rest of the tutorial will be posted soon. I just wanted to get some feedback on the application and make sure it works as expected.
Last edited by activefx (2008-09-12 06:38:57)