Possible Duplicate:
OpenID support for Ruby on Rails application
What's the best way to implement a pure OpenID authentication in Ruby On Rails?
Possible Duplicate:
OpenID support for Ruby on Rails application
What's the best way to implement a pure OpenID authentication in Ruby On Rails?
Use a library! Getting OpenID right, secure, interoperability tested, etc. is really a daunting task and most people who try get it wrong in many places. Use a mature library, like Janrain's Ruby OpenID library.
check Ryan Bates Rails Casts: http://railscasts.com/episodes/170-openid-with-authlogic http://railscasts.com/episodes/68-openid-authentication
There is now a community wiki for this: http://stackoverflow.com/questions/66885/openid-support-for-ruby-on-rails-application.
Please consider dropping this question.