This directory contains several examples that demonstrate use of the OpenID library. Make sure you have properly installed the library before running the examples. These examples are a great place to start in integrating OpenID into your application. ==consumer.rb consumer.rb runs a simple web server (WEBrick) and will verify OpenID identities. To test this out you'll need a valid OpenID URL and to run: ruby consumer.rb Point your browser at http://localhost:2000/ and follow the instructions. ==Rails server example The rails_server contains a fully functions OpenID server, and acts as a starting point for implementing your own production rails server. You'll need the latest version of Ruby on Rails installed, and then: cd rails_server ./script/server Open a web browser to http://localhost:3000/ and follow the instructions. ==Rails OpenidLoginGenerator A port of the standard LoginGenerator OpenID authentication instead of passwords. Use this generator as a *starting point* for your OpenID enabled rails app. You can read about LoginGenerator at http://wiki.rubyonrails.com/rails/pages/LoginGenerator ===Running the generator * Copy the contents of rails_openid_login_generator into ~/.rails/generators/openid_login (or symlink: ln -s examples/rails_openid_login_generator ~/.rails/generators/openid_login) * run script/generate openid_login openid You will now have an openid_controller.rb in app/controllers. You'll need to create your 'users' database table before running the application. For schemas and more details about this generator, read README_LOGIN in you rails root directory. ==Rails ActiveRecord OpenIDStore example For various reasons you may want or need to deploy your ruby openid consumer/server using an SQL based store. The README and code in the rails_active_record_store example explain in detail how this can be done.