diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-07 21:35:21 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-07 21:40:43 -0700 |
commit | 7e0863f2958c4fabd5a1aee4675ec72c0135e8a8 (patch) | |
tree | 9db99014e700de9a4e8737f72777db1d3f025a9c | |
parent | cb2449875980e403bba73ed0a4b07a321be621be (diff) | |
download | DotNetOpenAuth-7e0863f2958c4fabd5a1aee4675ec72c0135e8a8.zip DotNetOpenAuth-7e0863f2958c4fabd5a1aee4675ec72c0135e8a8.tar.gz DotNetOpenAuth-7e0863f2958c4fabd5a1aee4675ec72c0135e8a8.tar.bz2 |
Added a more descriptive and helpful message to nonce expiration log messages.
-rw-r--r-- | src/DotNetOpenId/Nonce.cs | 3 | ||||
-rw-r--r-- | src/DotNetOpenId/Protocol.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenId/Strings.Designer.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenId/Strings.resx | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/DotNetOpenId/Nonce.cs b/src/DotNetOpenId/Nonce.cs index b86b4e8..3876fde 100644 --- a/src/DotNetOpenId/Nonce.cs +++ b/src/DotNetOpenId/Nonce.cs @@ -95,7 +95,8 @@ namespace DotNetOpenId { internal void Consume(INonceStore store) {
if (IsExpired)
- throw new OpenIdException(Strings.ExpiredNonce);
+ throw new OpenIdException(string.Format(CultureInfo.CurrentCulture,
+ Strings.ExpiredNonce, ExpirationDate, DateTime.UtcNow));
// We could store unused nonces and remove them as they are used, or
// we could store used nonces and check that they do not previously exist.
diff --git a/src/DotNetOpenId/Protocol.cs b/src/DotNetOpenId/Protocol.cs index df26e55..f0af0ea 100644 --- a/src/DotNetOpenId/Protocol.cs +++ b/src/DotNetOpenId/Protocol.cs @@ -292,7 +292,7 @@ namespace DotNetOpenId { /// <remarks>
/// This is used to calculate the length of time that nonces are stored.
/// This is internal until we can decide whether to leave this static, or make
- /// it an instance member, or put it inside the IConsumerAppliationStore interface.
+ /// it an instance member, or put it inside the IConsumerApplicationStore interface.
/// </remarks>
internal static TimeSpan MaximumUserAgentAuthenticationTime = TimeSpan.FromMinutes(5);
/// <summary>
diff --git a/src/DotNetOpenId/Strings.Designer.cs b/src/DotNetOpenId/Strings.Designer.cs index 20f37eb..71321c6 100644 --- a/src/DotNetOpenId/Strings.Designer.cs +++ b/src/DotNetOpenId/Strings.Designer.cs @@ -124,7 +124,7 @@ namespace DotNetOpenId { }
/// <summary>
- /// Looks up a localized string similar to The nonce has expired..
+ /// Looks up a localized string similar to The nonce has expired. It was good until {0} (UTC), and it is now {1} (UTC). If this looks wrong, check the server's clock, timezone and daylight savings settings..
/// </summary>
internal static string ExpiredNonce {
get {
diff --git a/src/DotNetOpenId/Strings.resx b/src/DotNetOpenId/Strings.resx index 4ddc7dc..69b6394 100644 --- a/src/DotNetOpenId/Strings.resx +++ b/src/DotNetOpenId/Strings.resx @@ -139,7 +139,7 @@ <value>OpenID parameter '{0}' was expected to be base64 encoded but is not.</value>
</data>
<data name="ExpiredNonce" xml:space="preserve">
- <value>The nonce has expired.</value>
+ <value>The nonce has expired. It was good until {0} (UTC), and it is now {1} (UTC). If this looks wrong, check the server's clock, timezone and daylight savings settings.</value>
</data>
<data name="ExtensionAlreadyAddedWithSameTypeURI" xml:space="preserve">
<value>An extension sharing namespace '{0}' has already been added. Only one extension per namespace is allowed in a given request.</value>
|