Sha256: 3d357fde09a89eee2d2d5e12d9fe638f0d6b390a229872a6015220e22ca8c121

Contents?: true

Size: 1.69 KB

Versions: 14

Compression:

Stored size: 1.69 KB

Contents

=Active Record OpenID Store Plugin

A store is required by an OpenID server and optionally by the consumer
to store associations, nonces, and auth key information across
requests and processes.  If rails is distributed across several
machines, they must must all have access to the same OpenID store
data, so the FilesystemStore won't do.

This directory contains a plugin for connecting your
OpenID enabled rails app to an ActiveRecord based OpenID store.

==Install

1) Copy this directory and all it's contents into your
RAILS_ROOT/vendor/plugins directory.  You structure should look like
this:

  RAILS_ROOT/vendor/plugins/active_record_openid_store/

2) Copy the migration, XXX_add_open_id_store_to_db.rb to your
   RAILS_ROOT/db/migrate directory.  Rename the XXX portion of the
   file to next sequential migration number.

3) Run the migration:

  rake migrate

4) Change your app to use the ActiveRecordOpenIDStore:

  store = ActiveRecordOpenIDStore.new
  consumer = OpenID::Consumer.new(session, store)

5) That's it! All your OpenID state will now be stored in the database.

==Upgrade

If you are upgrading from the 1.x ActiveRecord store, replace your old
RAILS_ROOT/vendor/plugins/active_record_openid_store/ directory with
the new one and run the migration XXX_upgrade_open_id_store.rb.

==What about garbage collection? 

You may garbage collect unused nonces and expired associations using
the gc instance method of ActiveRecordOpenIDStore.  Hook it up to a
task in your app's Rakefile like so:

  desc 'GC OpenID store'
  task :gc_openid_store => :environment do
    ActiveRecordOpenIDStore.new.cleanup
  end

Run it by typing:

  rake gc_openid_store


==Questions?
Contact Dag Arneson: dag at janrain dot com

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
pelle-ruby-openid-2.1.8 examples/active_record_openid_store/README
entp-ruby-openid-2.2 examples/active_record_openid_store/README
nov-ruby-openid-2.1.9 examples/active_record_openid_store/README
ruby-openid-2.1.8 examples/active_record_openid_store/README
pelle-ruby-openid-2.1.9 examples/active_record_openid_store/README
ruby-openid-2.1.7 examples/active_record_openid_store/README
ruby-openid-2.0.1 examples/active_record_openid_store/README
ruby-openid-2.0.2 examples/active_record_openid_store/README
ruby-openid-2.1.6 examples/active_record_openid_store/README
ruby-openid-2.1.4 examples/active_record_openid_store/README
ruby-openid-2.0.4 examples/active_record_openid_store/README
ruby-openid-2.1.5 examples/active_record_openid_store/README
ruby-openid-2.0.3 examples/active_record_openid_store/README
ruby-openid-2.1.2 examples/active_record_openid_store/README