Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9207

Show
Ignore:
Timestamp:
04/02/08 03:33:33 (8 months ago)
Author:
rick
Message:

delete the format parameter so that openid works on the iphone. add support for config.gem on rails 2.1+

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/open_id_authentication/init.rb

    r9103 r9207  
    1 begin 
    2   require 'openid
    3 rescue LoadError 
     1if config.respond_to?(:gems) 
     2  config.gem 'ruby-openid', :lib => 'openid', :version => '>=2.0.4
     3else 
    44  begin 
    5     gem 'ruby-openid', '>=2.0.4' 
    6   rescue Gem::LoadError 
    7     puts "Install the ruby-openid gem to enable OpenID support" 
     5    require 'openid' 
     6  rescue LoadError 
     7    begin 
     8      gem 'ruby-openid', '>=2.0.4' 
     9    rescue Gem::LoadError 
     10      puts "Install the ruby-openid gem to enable OpenID support" 
     11    end 
    812  end 
    913end 
    1014 
    11 ActionController::Base.send :include, OpenIdAuthentication 
     15config.to_prepare do 
     16  ActionController::Base.send :include, OpenIdAuthentication 
     17end 
  • plugins/open_id_authentication/lib/open_id_authentication.rb

    r9169 r9207  
    102102    def complete_open_id_authentication 
    103103      params_with_path = params.reject { |key, value| request.path_parameters[key] } 
     104      params_with_path.delete(:format) 
    104105      open_id_response = timeout_protection_from_identity_server { open_id_consumer.complete(params_with_path, requested_url) } 
    105106      identity_url     = normalize_url(open_id_response.endpoint.claimed_id) if open_id_response.endpoint.claimed_id