Skip to content

Commit

Permalink
use OpenID to do the URL normalization; this isn't in the rails plugi…
Browse files Browse the repository at this point in the history
…n anymore
  • Loading branch information
Michael Reinsch committed Mar 17, 2010
1 parent 8c242a5 commit 9b802c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/authlogic_openid/acts_as_authentic.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def self.included(klass)


# Set the openid_identifier field and also resets the persistence_token if this value changes. # Set the openid_identifier field and also resets the persistence_token if this value changes.
def openid_identifier=(value) def openid_identifier=(value)
write_attribute(:openid_identifier, value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value)) write_attribute(:openid_identifier, value.blank? ? nil : OpenID.normalize_url(value))
reset_persistence_token if openid_identifier_changed? reset_persistence_token if openid_identifier_changed?
rescue OpenIdAuthentication::InvalidOpenId => e rescue OpenID::DiscoveryFailure => e
@openid_error = e.message @openid_error = e.message
end end


Expand Down
4 changes: 2 additions & 2 deletions lib/authlogic_openid/session.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def credentials=(value)
end end


def openid_identifier=(value) def openid_identifier=(value)
@openid_identifier = value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value) @openid_identifier = value.blank? ? nil : OpenID.normalize_url(value)
@openid_error = nil @openid_error = nil
rescue OpenIdAuthentication::InvalidOpenId => e rescue OpenID::DiscoveryFailure => e
@openid_identifier = nil @openid_identifier = nil
@openid_error = e.message @openid_error = e.message
end end
Expand Down

0 comments on commit 9b802c3

Please sign in to comment.