From 1fb6668e25d7b4a0c4f9bd5749ca8ea54878eda3 Mon Sep 17 00:00:00 2001 From: Nathaniel Bibler Date: Mon, 5 May 2008 15:35:33 -0500 Subject: [PATCH] Return the response.display_identifier instead of claim_id to the application. Signed-off-by: Joshua Peek --- CHANGELOG | 2 ++ lib/open_id_authentication.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index ea5efab..09ee9bc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Return open_id_response.display_identifier to the application instead of .endpoints.claimed_id. [nbibler] + * Add Timeout protection [Rick] * An invalid identity url passed through authenticate_with_open_id will no longer raise an InvalidOpenId exception. Instead it will return Result[:missing] to the completion block. diff --git a/lib/open_id_authentication.rb b/lib/open_id_authentication.rb index 42fbd42..f649b61 100644 --- a/lib/open_id_authentication.rb +++ b/lib/open_id_authentication.rb @@ -105,7 +105,7 @@ def complete_open_id_authentication params_with_path = params.reject { |key, value| request.path_parameters[key] } params_with_path.delete(:format) open_id_response = timeout_protection_from_identity_server { open_id_consumer.complete(params_with_path, requested_url) } - identity_url = normalize_url(open_id_response.endpoint.claimed_id) if open_id_response.endpoint.claimed_id + identity_url = normalize_url(open_id_response.display_identifier) if open_id_response.display_identifier case open_id_response.status when OpenID::Consumer::SUCCESS