summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-08 16:22:58 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-08 16:22:58 -0700
commitd9c0ee017807cc17132e9c760d274afffc9b981c (patch)
tree28a79463a760a10c4d67cbac48f9a6af5cd25b32 /src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs
parent1c3247abc8fb37405d0602e5037b3cebbe8e944a (diff)
downloadDotNetOpenAuth-d9c0ee017807cc17132e9c760d274afffc9b981c.zip
DotNetOpenAuth-d9c0ee017807cc17132e9c760d274afffc9b981c.tar.gz
DotNetOpenAuth-d9c0ee017807cc17132e9c760d274afffc9b981c.tar.bz2
Split up ITokenManager into two derived interfaces to better fit Consumer and Service Provider scenarios.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs')
-rw-r--r--src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs
index 88ada15..2d14bc8 100644
--- a/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs
+++ b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs
@@ -26,14 +26,26 @@ namespace DotNetOpenAuth.Test.Mocks {
/// <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>
- internal CoordinatingOAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, bool isConsumer, ITokenManager tokenManager)
+ internal CoordinatingOAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, IConsumerTokenManager tokenManager)
: base(
signingBindingElement,
new NonceMemoryStore(StandardExpirationBindingElement.DefaultMaximumMessageAge),
- tokenManager,
- isConsumer ? (IMessageFactory)new OAuthConsumerMessageFactory() : new OAuthServiceProviderMessageFactory(tokenManager)) {
+ tokenManager) {
+ }
+
+ /// <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="tokenManager">The token manager to use.</param>
+ internal CoordinatingOAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, IServiceProviderTokenManager tokenManager)
+ : base(
+ signingBindingElement,
+ new NonceMemoryStore(StandardExpirationBindingElement.DefaultMaximumMessageAge),
+ tokenManager) {
}
/// <summary>