It’s just data

OpenID Consumer on Rails

I’ve roughed in the consumer pieces to my OpenID implementation.  Except for the autodiscovery, all the pieces were things I could lift from my test cases, and in one case, from the server support for dumb consumers.  My implementation attempts to be smart consumer, but will degrade as necessary.

Despite the fact that I can self-authenticate, I won’t feel confident about this until I get some real test cases in place, but in order to do that, I needed to have a rough idea of what I will need to mock up, as the consumer doesn’t merely redirect, it actively will attempt to fetch resources.

Along the way, I hit some problems, that I will share with others:

Now, onto the implementation.  Rails is opinionated software, and the world needs more opinionated software.  I, for example, believe that any self respecting class named URI::HTTP should have get, post, put, delete, and head methods, and for now, I’m adding get and post.  These should also serve as useful hook points for me to mock up, but first I need to figure out how TestControllers dispatch requests.  It looks like everything I will need to know can be found in the In the process method defined in test_process.rb, but along the way I’ve figured out how to a url_for method, and in my opinion, TestControllers should have a url_for method.