Well, I made some progress and now the whole thing is a rails plugin, based on the restful_authentication one. You can get it here: git://github.com/labria/restful-authentication.git
The readme has all the info. If something is missing, not working or anything else, please tell me, it’s my first rails plugin ever. By the way if you even bother testing it or looking at the code, please leave me a comment.
Things to do yet:
- remove some hard-coded stuff.
- make certificate delivery more natural (if I happen to find a way to do it)
- dunno, I think much more will come up…