Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix deprecation warnings

  • Loading branch information...
commit e992736a89013fd01a56fbc4694a0ab6d4472909 1 parent 10764ad
Joshua Peek josh authored

Showing 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. +7 3 lib/open_id_authentication.rb
10 lib/open_id_authentication.rb
@@ -100,12 +100,16 @@ def self.normalize_identifier(identifier)
100 100
101 101 # deprecated for OpenID 2.0, where not all OpenIDs are URLs
102 102 def self.normalize_url(url)
103   - ActiveSupport::Deprecation.warn "normalize_identifier has been deprecated, use normalize instead"
  103 + ActiveSupport::Deprecation.warn "normalize_url has been deprecated, use normalize_identifier instead"
104 104 self.normalize_identifier(url)
105 105 end
106 106
107 107 protected
108 108 def normalize_url(url)
  109 + OpenIdAuthentication.normalize_url(url)
  110 + end
  111 +
  112 + def normalize_identifier(url)
109 113 OpenIdAuthentication.normalize_identifier(url)
110 114 end
111 115
@@ -128,7 +132,7 @@ def authenticate_with_open_id(identity_url = nil, options = {}, &block) #:doc:
128 132
129 133 private
130 134 def begin_open_id_authentication(identity_url, options = {})
131   - identity_url = normalize_url(identity_url)
  135 + identity_url = normalize_identifier(identity_url)
132 136 return_to = options.delete(:return_to)
133 137 method = options.delete(:method)
134 138
@@ -146,7 +150,7 @@ def complete_open_id_authentication
146 150 params_with_path = params.reject { |key, value| request.path_parameters[key] }
147 151 params_with_path.delete(:format)
148 152 open_id_response = timeout_protection_from_identity_server { open_id_consumer.complete(params_with_path, requested_url) }
149   - identity_url = normalize_url(open_id_response.display_identifier) if open_id_response.display_identifier
  153 + identity_url = normalize_identifier(open_id_response.display_identifier) if open_id_response.display_identifier
150 154
151 155 case open_id_response.status
152 156 when OpenID::Consumer::SUCCESS

0 comments on commit e992736

Please sign in to comment.
Something went wrong with that request. Please try again.