Permalink
Browse files

store= for assigning memcache store

  • Loading branch information...
josh committed Jan 13, 2010
1 parent 068a556 commit 4fab12045f8ad5209e2538145024c1aab81aa8af
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/open_id_authentication.rb
@@ -2,7 +2,6 @@
require 'openid'
require 'openid/extensions/sreg'
require 'openid/extensions/ax'
-require 'openid/store/filesystem'
require 'rack/openid'
module OpenIdAuthentication
@@ -21,9 +20,14 @@ def self.store=(*store_option)
@@store = case store
when :memory
+ require 'openid/store/memory'
OpenID::Store::Memory.new
when :file
+ require 'openid/store/filesystem'
OpenID::Store::Filesystem.new(OPEN_ID_AUTHENTICATION_DIR)
+ when :memcache
+ require 'openid/store/memcache'
+ OpenID::Store::Memcache.new(MemCache.new(parameters))
else
store
end

0 comments on commit 4fab120

Please sign in to comment.