omniauth--omniauth/oa-openid
Michael Bleigh db46a2e540 Update licenses throughout the gems. 2011-01-05 09:53:29 -06:00
..
lib/omniauth Everything can now be initialized with a block instead of arguments. Closes #56 2010-11-29 12:59:20 -06:00
spec Closes #103 - OpenID name is stripped to create a proper blank. 2010-11-28 18:50:24 -06:00
Gemfile Adds support for Google Apps for the domain. 2010-07-19 10:07:21 -05:00
LICENSE Update licenses throughout the gems. 2011-01-05 09:53:29 -06:00
README.rdoc Adding README to oa-openid 2010-11-28 21:02:24 -08:00
Rakefile Upgrade to RSpec 2.0, add universal options hash for strategies, custom paths, closes #54 2010-11-03 13:19:10 -05:00
oa-openid.gemspec At last, Attribute Exchange for OpenID worked out to properly provide names from Google. 2010-10-19 12:46:42 -05:00

README.rdoc

= OmniAuth::OpenID 

Provides strategies for authenticating to providers using the OpenID standard. 

== Installation

To get just OpenID functionality:

    gem install oa-openid

For the full auth suite:

    gem install omniauth

== Stand-Alone Example

Use the strategy as a middleware in your application:

    require 'omniauth/openid'
    require 'openid/store/filesystem'

    use Rack::Session::Cookie
    use OmniAuth::Strategies::OpenID, OpenID::Store::Filesystem.new('/tmp')

Then simply direct users to '/auth/open_id' to prompt them for their OpenID identifier. You may also pre-set the identifier by passing an <tt>identifier</tt> parameter to the URL (Example: <tt>/auth/open_id?openid_url=yahoo.com</tt>).

A list of all OpenID stores is available at http://github.com/openid/ruby-openid/tree/master/lib/openid/store/

== OmniAuth Builder

If OpenID is one of several authentication strategies, use the OmniAuth Builder:

    require 'omniauth/openid'
    require 'omniauth/basic'  # for Campfire
    require 'openid/store/filesystem'

    use OmniAuth::Builder do
      provider :open_id, OpenID::Store::Filesystem.new('/tmp')
      provider :campfire
    end

== Configured Identifiers

You may pre-configure an OpenID identifier.  For example, to use Google's main OpenID endpoint:

    use OmniAuth::Builder do
      provider :open_id, nil, :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
    end

Note the use of nil, which will trigger ruby-openid's default Memory Store.