diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-02-04 21:17:44 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-02-04 21:17:44 -0800 |
commit | 02f2c3d583b2bc134aec8c9ffb6b97d0e9af553b (patch) | |
tree | 0d9b9b51800845a0e6bc07439fb55b847b2ef166 /samples/RelyingPartyWebForms/Code/CustomStore.cs | |
parent | efc59889061d44ba3fbd7701338e323aa053fbdf (diff) | |
download | DotNetOpenAuth-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.cs | 7 |
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( |