<% if session[:username].nil? %>
Type a username:
<% end %>

Welcome to the Ruby OpenID example. This code is a starting point for developers wishing to implement an OpenID provider or relying party. We've used the Rails platform to demonstrate, but the library code is not Rails specific.

To use the example provider

  1. Enter a username in the form above. You will be "Logged In" to the server, at which point you may authenticate using an OpenID consumer. Your OpenID URL will be displayed after you log in.

    The server will automatically create an identity page for you at <%= @base_url %>user/name

  2. Because WEBrick can only handle one thing at a time, you'll need to run another instance of the example on another port if you want to use a relying party to use with this example provider:

    script/server --port=3001

    (The RP needs to be able to access the provider, so unless you're running this example on a public IP, you can't use the live example at openidenabled.com on your local provider.)

  3. Point your browser to this new instance and follow the directions below.

To use the example relying party

Visit /consumer and enter your OpenID.