summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-09-15 22:11:08 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-09-15 22:11:08 -0700
commit07e0139aaeec0a5fb6502eb908ab3c5fc7dac9ef (patch)
treed5f33410d9fb77d8a65e7f944c2b727287c3a5f8 /samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
parentafe1b92ce1d37dc89cddb42ab6b7d257311df65f (diff)
downloadDotNetOpenAuth-07e0139aaeec0a5fb6502eb908ab3c5fc7dac9ef.zip
DotNetOpenAuth-07e0139aaeec0a5fb6502eb908ab3c5fc7dac9ef.tar.gz
DotNetOpenAuth-07e0139aaeec0a5fb6502eb908ab3c5fc7dac9ef.tar.bz2
Fixed faulty sample custom nonce store.
Fixes #129
Diffstat (limited to 'samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs')
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs b/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
index 2363aec..07f209b 100644
--- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
+++ b/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
@@ -64,13 +64,14 @@
// at you in the result of a race condition somewhere in your web site UI code
// and display some message to have the user try to log in again, and possibly
// warn them about a replay attack.
+ timestamp = timestamp.ToLocalTime();
lock (this) {
- if (dataSet.Nonce.FindByCodeContext(nonce, context) != null) {
+ if (dataSet.Nonce.FindByIssuedCodeContext(timestamp, nonce, context) != null) {
return false;
}
TimeSpan maxMessageAge = DotNetOpenAuth.Configuration.DotNetOpenAuthSection.Configuration.Messaging.MaximumMessageLifetime;
- dataSet.Nonce.AddNonceRow(context, nonce, timestamp.ToLocalTime(), (timestamp + maxMessageAge).ToLocalTime());
+ dataSet.Nonce.AddNonceRow(context, nonce, timestamp, timestamp + maxMessageAge);
return true;
}
}