summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs')
-rw-r--r--src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs b/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
index c49d341..06cdf87 100644
--- a/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
+++ b/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
@@ -31,10 +31,23 @@ namespace DotNetOAuth.Test.Scenarios {
/// </param>
/// <param name="isConsumer">True if this channel is constructed for a Consumer.</param>
internal CoordinatingOAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, bool isConsumer)
+ : this(signingBindingElement, isConsumer, new InMemoryTokenManager()) {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CoordinatingOAuthChannel"/> class for Consumers.
+ /// </summary>
+ /// <param name="signingBindingElement">
+ /// The signing element for the Consumer to use. Null for the Service Provider.
+ /// </param>
+ /// <param name="isConsumer">True if this channel is constructed for a Consumer.</param>
+ /// <param name="tokenManager">The token manager to use.</param>
+ private CoordinatingOAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, bool isConsumer, ITokenManager tokenManager)
: base(
signingBindingElement,
new NonceMemoryStore(StandardExpirationBindingElement.DefaultMaximumMessageAge),
- isConsumer ? (IMessageTypeProvider)new OAuthConsumerMessageTypeProvider(new InMemoryTokenManager()) : new OAuthServiceProviderMessageTypeProvider(new InMemoryTokenManager()),
+ tokenManager,
+ isConsumer ? (IMessageTypeProvider)new OAuthConsumerMessageTypeProvider(tokenManager) : new OAuthServiceProviderMessageTypeProvider(tokenManager),
new TestWebRequestHandler()) {
}