Path: | examples/README |
Last Update: | Mon Sep 10 13:25:27 -0700 2007 |
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 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 localhost:2000/ and follow the instructions.
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 localhost:3000/ and follow the instructions.
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 wiki.rubyonrails.com/rails/pages/LoginGenerator
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.
For various reasons you may want or need to deploy your ruby openid consumer/server using an SQL based store. The active_record_openid_store is a plugin that makes using an SQL based store simple. Follow the README inside the plugin‘s dir for usage.