Normalize token, not URL

OpenID 2.0 supports tokens that aren't valid URLs
This commit is contained in:
Eric Allen 2009-12-07 18:43:34 -05:00
parent 0dfb1aafda
commit 0e7c2a344c

View file

@ -157,7 +157,7 @@ class User < ActiveRecord::Base
end
def self.find_by_open_id_url(raw_identity_url)
normalized_open_id_url = OpenIdAuthentication.normalize_url(raw_identity_url)
normalized_open_id_url = OpenIdAuthentication.normalize_identifier(raw_identity_url)
find(:first, :conditions => ['open_id_url = ?', normalized_open_id_url])
end
@ -248,6 +248,6 @@ protected
def normalize_open_id_url
return if open_id_url.nil?
self.open_id_url = OpenIdAuthentication.normalize_url(open_id_url)
self.open_id_url = OpenIdAuthentication.normalize_identifier(open_id_url)
end
end