OpenID Check on Rails
Looking at openidauthentication, it doesn’t seem to do everything I want. Since I am looking to check an identity during the processing of a request, I don’t need a ‘login’, instead I need to somehow have the id of the unprocessed record tag alone with the identity request.
The No Shit Guide is quite a bit simpler, but is based on the 1.1.x version of the ruby-openid library.
This controller contains a simpler pair of methods (one public, one protected) that does what I want and can easily be adapted. Simply drop these two methods into your favorite controller and modify the actions that are taken at the obvious points (DiscoveryFailure, success, failure, cancel, other). At the moment, all that is done is that the data is logged and/or stashed into a session, but it could easily be modified so that a failure or cancel could trigger moderation, or a required preview, or a captcha, or whatever.