summaryrefslogtreecommitdiffstats
path: root/samples/RelyingPartyWebForms/Code/CustomStore.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-02-04 21:17:44 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-02-04 21:17:44 -0800
commit02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b (patch)
tree0d9b9b51800845a0e6bc07439fb55b847b2ef166 /samples/RelyingPartyWebForms/Code/CustomStore.cs
parentefc59889061d44ba3fbd7701338e323aa053fbdf (diff)
downloadDotNetOpenAuth-02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b.zip
DotNetOpenAuth-02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b.tar.gz
DotNetOpenAuth-02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b.tar.bz2
Fixed TODO areas of code.
Diffstat (limited to 'samples/RelyingPartyWebForms/Code/CustomStore.cs')
-rw-r--r--samples/RelyingPartyWebForms/Code/CustomStore.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/samples/RelyingPartyWebForms/Code/CustomStore.cs b/samples/RelyingPartyWebForms/Code/CustomStore.cs
index b250919..0444bd8 100644
--- a/samples/RelyingPartyWebForms/Code/CustomStore.cs
+++ b/samples/RelyingPartyWebForms/Code/CustomStore.cs
@@ -65,8 +65,8 @@
return false;
}
- // TODO: calculate the actual expiration date.
- dataSet.Nonce.AddNonceRow(nonce, timestamp.ToLocalTime(), (timestamp + TimeSpan.FromHours(1)).ToLocalTime());
+ TimeSpan maxMessageAge = DotNetOpenAuth.Configuration.DotNetOpenAuthSection.Configuration.Messaging.MaximumMessageLifetime;
+ dataSet.Nonce.AddNonceRow(nonce, timestamp.ToLocalTime(), (timestamp + maxMessageAge).ToLocalTime());
return true;
}
}
@@ -88,7 +88,8 @@
dataSet.Association.AddAssociationRow(assocRow);
}
- public Association GetAssociation(Uri distinguishingFactor) {
+ public Association GetAssociation(Uri distinguishingFactor, SecuritySettings securitySettings) {
+ // TODO: properly consider the securitySettings when picking an association to return.
// properly escape the URL to prevent injection attacks.
string value = distinguishingFactor.AbsoluteUri.Replace("'", "''");
string filter = string.Format(