summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-04-27 06:53:07 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2012-04-27 06:53:07 -0700
commit3b36cc6f6729a6f3f8dc478ff464960920aff653 (patch)
tree544f84ccfd1ae2ef08761fef7816711a2d692f17 /src
parent4f537e8e221d04db2335017b5b78a262f8f144ee (diff)
downloadDotNetOpenAuth-3b36cc6f6729a6f3f8dc478ff464960920aff653.zip
DotNetOpenAuth-3b36cc6f6729a6f3f8dc478ff464960920aff653.tar.gz
DotNetOpenAuth-3b36cc6f6729a6f3f8dc478ff464960920aff653.tar.bz2
Fixes OpenIdRelyingParty so it truly operates in stateless mode when null is passed into the constructor.
Fixes #129
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs
index 4dba624..6264041 100644
--- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs
+++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs
@@ -99,7 +99,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
/// <summary>
/// Initializes a new instance of the <see cref="OpenIdRelyingParty"/> class.
/// </summary>
- /// <param name="applicationStore">The application store. If <c>null</c>, the relying party will always operate in "dumb mode".</param>
+ /// <param name="applicationStore">The application store. If <c>null</c>, the relying party will always operate in "stateless/dumb mode".</param>
public OpenIdRelyingParty(IOpenIdApplicationStore applicationStore)
: this(applicationStore, applicationStore) {
}
@@ -107,8 +107,8 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
/// <summary>
/// Initializes a new instance of the <see cref="OpenIdRelyingParty"/> class.
/// </summary>
- /// <param name="cryptoKeyStore">The association store. If null, the relying party will always operate in "dumb mode".</param>
- /// <param name="nonceStore">The nonce store to use. If null, the relying party will always operate in "dumb mode".</param>
+ /// <param name="cryptoKeyStore">The association store. If <c>null</c>, the relying party will always operate in "stateless/dumb mode".</param>
+ /// <param name="nonceStore">The nonce store to use. If <c>null</c>, the relying party will always operate in "stateless/dumb mode".</param>
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "Unavoidable")]
private OpenIdRelyingParty(ICryptoKeyStore cryptoKeyStore, INonceStore nonceStore) {
// If we are a smart-mode RP (supporting associations), then we MUST also be
@@ -133,12 +133,9 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
this.SecuritySettings.MinimumRequiredOpenIdVersion = ProtocolVersion.V20;
}
- if (cryptoKeyStore == null) {
- cryptoKeyStore = new MemoryCryptoKeyStore();
- }
-
this.channel = new OpenIdRelyingPartyChannel(cryptoKeyStore, nonceStore, this.SecuritySettings);
- this.AssociationManager = new AssociationManager(this.Channel, new CryptoKeyStoreAsRelyingPartyAssociationStore(cryptoKeyStore), this.SecuritySettings);
+ var associationStore = cryptoKeyStore != null ? new CryptoKeyStoreAsRelyingPartyAssociationStore(cryptoKeyStore) : null;
+ this.AssociationManager = new AssociationManager(this.Channel, associationStore, this.SecuritySettings);
this.discoveryServices = new IdentifierDiscoveryServices(this);
Reporting.RecordFeatureAndDependencyUse(this, cryptoKeyStore, nonceStore);