summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-08-22 19:16:35 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2008-08-22 19:16:35 -0700
commit7e44593bb48bfa298bc140ec7a2d79f96dc3f765 (patch)
treea3b22cf1fca1a4a426a485e542204d03a98ab6c8
parent461efb0f72aebb2e89e70b3771bc4364d8a3eb02 (diff)
downloadDotNetOpenAuth-7e44593bb48bfa298bc140ec7a2d79f96dc3f765.zip
DotNetOpenAuth-7e44593bb48bfa298bc140ec7a2d79f96dc3f765.tar.gz
DotNetOpenAuth-7e44593bb48bfa298bc140ec7a2d79f96dc3f765.tar.bz2
Enhanced log messaging.
-rw-r--r--src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs6
-rw-r--r--src/DotNetOpenId/RelyingParty/OpenIdAjaxTextBox.cs4
-rw-r--r--src/DotNetOpenId/Strings.Designer.cs2
-rw-r--r--src/DotNetOpenId/Strings.resx2
4 files changed, 9 insertions, 5 deletions
diff --git a/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs b/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs
index f8288c2..ba1bab1 100644
--- a/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs
+++ b/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs
@@ -253,14 +253,16 @@ namespace DotNetOpenId.RelyingParty {
return_to.Authority != requestUrl.Authority ||
return_to.AbsolutePath != requestUrl.AbsolutePath)
throw new OpenIdException(string.Format(CultureInfo.CurrentCulture,
- Strings.ReturnToParamDoesNotMatchRequestUrl, endpoint.Protocol.openid.return_to));
+ Strings.ReturnToParamDoesNotMatchRequestUrl, endpoint.Protocol.openid.return_to,
+ return_to, requestUrl));
NameValueCollection returnToArgs = HttpUtility.ParseQueryString(return_to.Query);
NameValueCollection requestArgs = HttpUtility.ParseQueryString(requestUrl.Query);
foreach (string paramName in returnToArgs) {
if (requestArgs[paramName] != returnToArgs[paramName])
throw new OpenIdException(string.Format(CultureInfo.CurrentCulture,
- Strings.ReturnToParamDoesNotMatchRequestUrl, endpoint.Protocol.openid.return_to));
+ Strings.ReturnToParamDoesNotMatchRequestUrl, endpoint.Protocol.openid.return_to,
+ return_to, requestUrl));
}
}
diff --git a/src/DotNetOpenId/RelyingParty/OpenIdAjaxTextBox.cs b/src/DotNetOpenId/RelyingParty/OpenIdAjaxTextBox.cs
index 3a7bedd..050ddcd 100644
--- a/src/DotNetOpenId/RelyingParty/OpenIdAjaxTextBox.cs
+++ b/src/DotNetOpenId/RelyingParty/OpenIdAjaxTextBox.cs
@@ -347,7 +347,9 @@ if (openidbox) {{ initAjaxOpenId(openidbox, '{1}', '{2}', {3}); }}
returnToNVC[key] = authDataFields[key];
} else {
if (returnToNVC[key] != authDataFields[key]) {
- throw new ArgumentException(Strings.ReturnToParamDoesNotMatchRequestUrl, key);
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture,
+ Strings.ReturnToParamDoesNotMatchRequestUrl, key,
+ returnToNVC[key], authDataFields[key]), key);
}
}
}
diff --git a/src/DotNetOpenId/Strings.Designer.cs b/src/DotNetOpenId/Strings.Designer.cs
index cc87aa9..0bd9784 100644
--- a/src/DotNetOpenId/Strings.Designer.cs
+++ b/src/DotNetOpenId/Strings.Designer.cs
@@ -542,7 +542,7 @@ namespace DotNetOpenId {
}
/// <summary>
- /// Looks up a localized string similar to The {0} parameter does not match the actual URL the request was made with..
+ /// Looks up a localized string similar to The {0} parameter ({1}) does not match the actual URL ({2}) the request was made with..
/// </summary>
internal static string ReturnToParamDoesNotMatchRequestUrl {
get {
diff --git a/src/DotNetOpenId/Strings.resx b/src/DotNetOpenId/Strings.resx
index d9b356f..48577ac 100644
--- a/src/DotNetOpenId/Strings.resx
+++ b/src/DotNetOpenId/Strings.resx
@@ -281,7 +281,7 @@ Discovered endpoint info:
<value>return_to '{0}' not under realm '{1}'.</value>
</data>
<data name="ReturnToParamDoesNotMatchRequestUrl" xml:space="preserve">
- <value>The {0} parameter does not match the actual URL the request was made with.</value>
+ <value>The {0} parameter ({1}) does not match the actual URL ({2}) the request was made with.</value>
</data>
<data name="TamperingDetected" xml:space="preserve">
<value>The '{0}' parameter was expected to have the value '{1}' but had '{2}' instead.</value>