Add the open_id_authentication plugin
The plugin is taken from http://github.com/rails/open_id_authentication commit 079b91f70602814c98d4345e198f743bb56b76b5 This plugin provides some convenience wrapper functions around the ruby gem ruby-openid
This commit is contained in:
parent
88098dc4ff
commit
58bb08aba8
19 changed files with 865 additions and 0 deletions
18
vendor/plugins/open_id_authentication/init.rb
vendored
Normal file
18
vendor/plugins/open_id_authentication/init.rb
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
if config.respond_to?(:gems)
|
||||
config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4'
|
||||
else
|
||||
begin
|
||||
require 'openid'
|
||||
rescue LoadError
|
||||
begin
|
||||
gem 'ruby-openid', '>=2.0.4'
|
||||
rescue Gem::LoadError
|
||||
puts "Install the ruby-openid gem to enable OpenID support"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
config.to_prepare do
|
||||
OpenID::Util.logger = Rails.logger
|
||||
ActionController::Base.send :include, OpenIdAuthentication
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue