summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth.Test/Scenarios/Coordinator.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-10-08 09:52:48 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-08 09:52:48 -0700
commit2276413c733f6a26e9b366214bdfb5677e711c75 (patch)
tree0047f172fa2a7f115baf243c0a8cf5a3e5fb4e92 /src/DotNetOAuth.Test/Scenarios/Coordinator.cs
parent29d897769f3e7a9568fa668836807d9a31b5fabc (diff)
downloadDotNetOpenAuth-2276413c733f6a26e9b366214bdfb5677e711c75.zip
DotNetOpenAuth-2276413c733f6a26e9b366214bdfb5677e711c75.tar.gz
DotNetOpenAuth-2276413c733f6a26e9b366214bdfb5677e711c75.tar.bz2
Moved SigningVerificationCallback handling to the OAuthChannel.
Diffstat (limited to 'src/DotNetOAuth.Test/Scenarios/Coordinator.cs')
-rw-r--r--src/DotNetOAuth.Test/Scenarios/Coordinator.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/DotNetOAuth.Test/Scenarios/Coordinator.cs b/src/DotNetOAuth.Test/Scenarios/Coordinator.cs
index ab270ce..f5e6adc 100644
--- a/src/DotNetOAuth.Test/Scenarios/Coordinator.cs
+++ b/src/DotNetOAuth.Test/Scenarios/Coordinator.cs
@@ -35,11 +35,8 @@ namespace DotNetOAuth.Test.Scenarios {
internal delegate void Actor(CoordinatingOAuthChannel channel);
/// <summary>
- /// Gets or sets the signing element the Consumer channel should use.
+ /// Gets or sets the signing element the channels should clone and use.
/// </summary>
- /// <remarks>
- /// The Service Provider never signs a message, so no property is necessary for that.
- /// </remarks>
internal ITamperProtectionChannelBindingElement SigningElement { get; set; }
/// <summary>
@@ -50,9 +47,15 @@ namespace DotNetOAuth.Test.Scenarios {
throw new InvalidOperationException("SigningElement must be set first.");
}
+ // Clone and reset the template signing binding element.
+ var consumerSigningElement = (ITamperProtectionChannelBindingElement)this.SigningElement.Clone();
+ var spSigningElement = (ITamperProtectionChannelBindingElement)this.SigningElement.Clone();
+ consumerSigningElement.SignatureVerificationCallback = null;
+ spSigningElement.SignatureVerificationCallback = null;
+
// Prepare channels that will pass messages directly back and forth.
- CoordinatingOAuthChannel consumerChannel = new CoordinatingOAuthChannel(this.SigningElement, true);
- CoordinatingOAuthChannel serviceProviderChannel = new CoordinatingOAuthChannel(this.SigningElement, false);
+ CoordinatingOAuthChannel consumerChannel = new CoordinatingOAuthChannel(consumerSigningElement, true);
+ CoordinatingOAuthChannel serviceProviderChannel = new CoordinatingOAuthChannel(spSigningElement, false);
consumerChannel.RemoteChannel = serviceProviderChannel;
serviceProviderChannel.RemoteChannel = consumerChannel;