Clearance Crypto

So in my foray into the rails templates world I’ve stumbled onto a couple of authentication options that I wasn’t previously aware of.

“Authlogic”: which is nice in that it moves all the actual authentication logic into a gem to make updates dead simple. The one thing I didn’t like was that you have to generate all of your own MVC code. Though honestly this isn’t such an issue now that I have it all rolled in to a “Rails 2.3 template”:

“Clearance”: is also nice in that it generates the MVC code yet still keeps all the authentication logic in a gem for easy updates. The only thing I didn’t really care for, though I do understand why they did it, is the inability to choose the hash algorithm.

Along comes “ClearanceCrypto”: this provides a very similar way to choose the hashing algorithm like you can in Authlogic. The code was picked and tweaked from the Authlogic code to match the way Clearance checks the authentication.

It’s very new and may have issues. Feel free to let me know if you find anything.

Rails templates - Round 3

And yet another big change to “Strappy”: there is a new branch that allows you to choose the authentication method you want to use (“Authlogic”:, “Clearance”: or “restful_authentication”: it’s currently located in a “branch called choosy”: but will probably be moving to master soon.

Rails templates - Round 2

So of course as soon as I finished adding in the coverage to restful_authentication I found “Authlogic”:…

So I went and revamped “Strappy”: to use Authlogic and bootstrap a ready to roll app with user logins and password resets. The original version using restful_authentication is still there in a “branch”:


restful_authentication and coverage

So I went and “forked the restful_authentication”: plugin/generator and added in the tiny bit of specs it needed to give you a clean slate when using it. No more excuses for slacking coverage.



I read an “article by Stpehen Celis”: way back when and liked the idea behind it, but not having to add the methods to all my controllers. So I rolled it up into a gem and can now get the same functionality by doing

class FooController < ApplicationController
  expose_model :foo

and get the foo and foos methods plus the helper_methods.

You can find it on "github":