mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
using redis as backend store
This commit is contained in:
parent
a7908e07d1
commit
67cc766f0c
3 changed files with 8 additions and 2 deletions
1
Gemfile
1
Gemfile
|
@ -28,6 +28,7 @@ gem 'mustache'
|
||||||
gem 'nokogiri'
|
gem 'nokogiri'
|
||||||
gem "omniauth"
|
gem "omniauth"
|
||||||
gem "omniauth-openid"
|
gem "omniauth-openid"
|
||||||
|
gem "openid-redis-store"
|
||||||
gem "omniauth-facebook"
|
gem "omniauth-facebook"
|
||||||
gem "omniauth-twitter"
|
gem "omniauth-twitter"
|
||||||
gem 'oj'
|
gem 'oj'
|
||||||
|
|
|
@ -283,6 +283,9 @@ GEM
|
||||||
omniauth-twitter (0.0.14)
|
omniauth-twitter (0.0.14)
|
||||||
multi_json (~> 1.3)
|
multi_json (~> 1.3)
|
||||||
omniauth-oauth (~> 1.0)
|
omniauth-oauth (~> 1.0)
|
||||||
|
openid-redis-store (0.0.2)
|
||||||
|
redis
|
||||||
|
ruby-openid
|
||||||
pbkdf2 (0.1.0)
|
pbkdf2 (0.1.0)
|
||||||
pg (0.14.1)
|
pg (0.14.1)
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
|
@ -477,6 +480,7 @@ DEPENDENCIES
|
||||||
omniauth-facebook
|
omniauth-facebook
|
||||||
omniauth-openid
|
omniauth-openid
|
||||||
omniauth-twitter
|
omniauth-twitter
|
||||||
|
openid-redis-store
|
||||||
pbkdf2
|
pbkdf2
|
||||||
pg
|
pg
|
||||||
pry-rails
|
pry-rails
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
require 'openid/store/filesystem'
|
require 'openid/store/filesystem'
|
||||||
require 'openssl'
|
require 'openssl'
|
||||||
|
require 'openid_redis_store'
|
||||||
module OpenSSL
|
module OpenSSL
|
||||||
module SSL
|
module SSL
|
||||||
remove_const :VERIFY_PEER
|
remove_const :VERIFY_PEER
|
||||||
|
@ -9,8 +10,8 @@ end
|
||||||
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
||||||
|
|
||||||
Rails.application.config.middleware.use OmniAuth::Builder do
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
||||||
provider :open_id, :store => OpenID::Store::Filesystem.new('/tmp'), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id', :require => 'omniauth-openid'
|
provider :open_id, :store => OpenID::Store::Redis.new($redis), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id', :require => 'omniauth-openid'
|
||||||
provider :open_id, :store => OpenID::Store::Filesystem.new('/tmp'), :name => 'yahoo', :identifier => 'https://me.yahoo.com', :require => 'omniauth-openid'
|
provider :open_id, :store => OpenID::Store::Redis.new($redis), :name => 'yahoo', :identifier => 'https://me.yahoo.com', :require => 'omniauth-openid'
|
||||||
provider :facebook, SiteSetting.facebook_app_id, SiteSetting.facebook_app_secret, :scope => "email"
|
provider :facebook, SiteSetting.facebook_app_id, SiteSetting.facebook_app_secret, :scope => "email"
|
||||||
provider :twitter, SiteSetting.twitter_consumer_key , SiteSetting.twitter_consumer_secret
|
provider :twitter, SiteSetting.twitter_consumer_key , SiteSetting.twitter_consumer_secret
|
||||||
end
|
end
|
Loading…
Reference in a new issue