summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Messaging
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOAuth/Messaging')
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/Bindings.cd76
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/ExpiredMessageException.cs (renamed from src/DotNetOAuth/Messaging/ExpiredMessageException.cs)2
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/IExpiringProtocolMessage.cs (renamed from src/DotNetOAuth/Messaging/IExpiringProtocolMessage.cs)4
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/IReplayProtectedProtocolMessage.cs (renamed from src/DotNetOAuth/Messaging/IReplayProtectedProtocolMessage.cs)5
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/ISignedOAuthMessage.cs (renamed from src/DotNetOAuth/Messaging/ISignedProtocolMessage.cs)6
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/InvalidSignatureException.cs (renamed from src/DotNetOAuth/Messaging/InvalidSignatureException.cs)2
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/ReplayedMessageException.cs (renamed from src/DotNetOAuth/Messaging/ReplayedMessageException.cs)2
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs (renamed from src/DotNetOAuth/Messaging/StandardMessageExpirationBindingElement.cs)20
-rw-r--r--src/DotNetOAuth/Messaging/Channel.cs13
-rw-r--r--src/DotNetOAuth/Messaging/Exceptions.cd33
-rw-r--r--src/DotNetOAuth/Messaging/IChannelBindingElement.cs2
-rw-r--r--src/DotNetOAuth/Messaging/IProtocolMessage.cs7
-rw-r--r--src/DotNetOAuth/Messaging/MessageProtection.cs (renamed from src/DotNetOAuth/Messaging/ChannelProtection.cs)4
-rw-r--r--src/DotNetOAuth/Messaging/Messaging.cd62
-rw-r--r--src/DotNetOAuth/Messaging/ProtocolException.cs11
15 files changed, 217 insertions, 32 deletions
diff --git a/src/DotNetOAuth/Messaging/Bindings/Bindings.cd b/src/DotNetOAuth/Messaging/Bindings/Bindings.cd
new file mode 100644
index 0000000..c663332
--- /dev/null
+++ b/src/DotNetOAuth/Messaging/Bindings/Bindings.cd
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ClassDiagram MajorVersion="1" MinorVersion="1">
+ <Class Name="DotNetOAuth.Messaging.Bindings.InvalidSignatureException" Collapsed="true">
+ <Position X="8.25" Y="2" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\Bindings\InvalidSignatureException.cs</FileName>
+ </TypeIdentifier>
+ </Class>
+ <Class Name="DotNetOAuth.Messaging.Bindings.ReplayedMessageException" Collapsed="true">
+ <Position X="6" Y="2" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\Bindings\ReplayedMessageException.cs</FileName>
+ </TypeIdentifier>
+ </Class>
+ <Class Name="DotNetOAuth.Messaging.Bindings.ExpiredMessageException" Collapsed="true">
+ <Position X="3.75" Y="2" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\Bindings\ExpiredMessageException.cs</FileName>
+ </TypeIdentifier>
+ </Class>
+ <Class Name="DotNetOAuth.Messaging.ProtocolException" Collapsed="true">
+ <Position X="6" Y="0.5" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAKAAAAAAAAAAAAAIBAAAAACAQAIAAAAACAAAAAAAA=</HashCode>
+ <FileName>Messaging\ProtocolException.cs</FileName>
+ </TypeIdentifier>
+ <Lollipop Position="0.2" />
+ </Class>
+ <Class Name="DotNetOAuth.Messaging.Bindings.StandardExpirationBindingElement" Collapsed="true">
+ <Position X="1" Y="3" Width="2.75" />
+ <TypeIdentifier>
+ <HashCode>AAAQAAAAAAAARAAAAAAAEAAAAAIAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\Bindings\StandardExpirationBindingElement.cs</FileName>
+ </TypeIdentifier>
+ <Lollipop Position="0.2" />
+ </Class>
+ <Interface Name="DotNetOAuth.Messaging.IProtocolMessage" Collapsed="true">
+ <Position X="6" Y="3.5" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAQAAAAAAAAAAAAAYAAAAAAAAAAAACAAAAAAA=</HashCode>
+ <FileName>Messaging\IProtocolMessage.cs</FileName>
+ </TypeIdentifier>
+ </Interface>
+ <Interface Name="DotNetOAuth.Messaging.Bindings.IExpiringProtocolMessage" Collapsed="true">
+ <Position X="3.75" Y="4.75" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\Bindings\IExpiringProtocolMessage.cs</FileName>
+ </TypeIdentifier>
+ </Interface>
+ <Interface Name="DotNetOAuth.Messaging.Bindings.IReplayProtectedProtocolMessage" Collapsed="true">
+ <Position X="6" Y="4.75" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAA=</HashCode>
+ <FileName>Messaging\Bindings\IReplayProtectedProtocolMessage.cs</FileName>
+ </TypeIdentifier>
+ </Interface>
+ <Interface Name="DotNetOAuth.Messaging.Bindings.ISignedOAuthMessage" Collapsed="true">
+ <Position X="8.25" Y="4.75" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=</HashCode>
+ <FileName>Messaging\Bindings\ISignedOAuthMessage.cs</FileName>
+ </TypeIdentifier>
+ </Interface>
+ <Interface Name="DotNetOAuth.Messaging.IChannelBindingElement">
+ <Position X="0.5" Y="0.5" Width="2" />
+ <TypeIdentifier>
+ <HashCode>BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAEAAAAAAAAA=</HashCode>
+ <FileName>Messaging\IChannelBindingElement.cs</FileName>
+ </TypeIdentifier>
+ </Interface>
+ <Font Name="Segoe UI" Size="9" />
+</ClassDiagram> \ No newline at end of file
diff --git a/src/DotNetOAuth/Messaging/ExpiredMessageException.cs b/src/DotNetOAuth/Messaging/Bindings/ExpiredMessageException.cs
index fe37b07..df4c446 100644
--- a/src/DotNetOAuth/Messaging/ExpiredMessageException.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/ExpiredMessageException.cs
@@ -4,7 +4,7 @@
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOAuth.Messaging {
+namespace DotNetOAuth.Messaging.Bindings {
using System;
/// <summary>
diff --git a/src/DotNetOAuth/Messaging/IExpiringProtocolMessage.cs b/src/DotNetOAuth/Messaging/Bindings/IExpiringProtocolMessage.cs
index 3867369..39c4f97 100644
--- a/src/DotNetOAuth/Messaging/IExpiringProtocolMessage.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/IExpiringProtocolMessage.cs
@@ -4,7 +4,7 @@
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOAuth.Messaging {
+namespace DotNetOAuth.Messaging.Bindings {
using System;
/// <summary>
@@ -13,7 +13,7 @@ namespace DotNetOAuth.Messaging {
/// <remarks>
/// All expiring messages must also be signed to prevent tampering with the creation date.
/// </remarks>
- internal interface IExpiringProtocolMessage : ISignedProtocolMessage {
+ internal interface IExpiringProtocolMessage : IProtocolMessage {
/// <summary>
/// Gets or sets the UTC date/time the message was originally sent onto the network.
/// </summary>
diff --git a/src/DotNetOAuth/Messaging/IReplayProtectedProtocolMessage.cs b/src/DotNetOAuth/Messaging/Bindings/IReplayProtectedProtocolMessage.cs
index bc6cd7b..e1a5674 100644
--- a/src/DotNetOAuth/Messaging/IReplayProtectedProtocolMessage.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/IReplayProtectedProtocolMessage.cs
@@ -4,8 +4,9 @@
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOAuth.Messaging {
+namespace DotNetOAuth.Messaging.Bindings {
using System;
+ using DotNetOAuth.Messaging;
/// <summary>
/// The contract a message that has an allowable time window for processing must implement.
@@ -14,7 +15,7 @@ namespace DotNetOAuth.Messaging {
/// All replay-protected messages must also be set to expire so the nonces do not have
/// to be stored indefinitely.
/// </remarks>
- internal interface IReplayProtectedProtocolMessage : IExpiringProtocolMessage {
+ internal interface IReplayProtectedProtocolMessage : IProtocolMessage {
/// <summary>
/// Gets or sets the nonce that will protect the message from replay attacks.
/// </summary>
diff --git a/src/DotNetOAuth/Messaging/ISignedProtocolMessage.cs b/src/DotNetOAuth/Messaging/Bindings/ISignedOAuthMessage.cs
index c3aae98..7ee83ff 100644
--- a/src/DotNetOAuth/Messaging/ISignedProtocolMessage.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/ISignedOAuthMessage.cs
@@ -1,14 +1,14 @@
//-----------------------------------------------------------------------
-// <copyright file="ISignedProtocolMessage.cs" company="Andrew Arnott">
+// <copyright file="ISignedOAuthMessage.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOAuth.Messaging {
+namespace DotNetOAuth.Messaging.Bindings {
/// <summary>
/// The contract a message that is signed must implement.
/// </summary>
- internal interface ISignedProtocolMessage : IProtocolMessage {
+ internal interface ISignedOAuthMessage : IProtocolMessage {
/// <summary>
/// Gets or sets the message signature.
/// </summary>
diff --git a/src/DotNetOAuth/Messaging/InvalidSignatureException.cs b/src/DotNetOAuth/Messaging/Bindings/InvalidSignatureException.cs
index 7b65f2d..89fa938 100644
--- a/src/DotNetOAuth/Messaging/InvalidSignatureException.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/InvalidSignatureException.cs
@@ -4,7 +4,7 @@
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOAuth.Messaging {
+namespace DotNetOAuth.Messaging.Bindings {
using System;
/// <summary>
diff --git a/src/DotNetOAuth/Messaging/ReplayedMessageException.cs b/src/DotNetOAuth/Messaging/Bindings/ReplayedMessageException.cs
index 2c4e5cb..11cf096 100644
--- a/src/DotNetOAuth/Messaging/ReplayedMessageException.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/ReplayedMessageException.cs
@@ -4,7 +4,7 @@
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOAuth.Messaging {
+namespace DotNetOAuth.Messaging.Bindings {
using System;
/// <summary>
diff --git a/src/DotNetOAuth/Messaging/StandardMessageExpirationBindingElement.cs b/src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs
index cfa0d31..154ea13 100644
--- a/src/DotNetOAuth/Messaging/StandardMessageExpirationBindingElement.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs
@@ -1,32 +1,32 @@
//-----------------------------------------------------------------------
-// <copyright file="StandardMessageExpirationBindingElement.cs" company="Andrew Arnott">
+// <copyright file="StandardExpirationBindingElement.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOAuth.Messaging {
+namespace DotNetOAuth.Messaging.Bindings {
using System;
/// <summary>
/// A message expiration enforcing binding element that supports messages
/// implementing the <see cref="IExpiringProtocolMessage"/> interface.
/// </summary>
- internal class StandardMessageExpirationBindingElement : IChannelBindingElement {
+ internal class StandardExpirationBindingElement : IChannelBindingElement {
/// <summary>
/// The default maximum message age to use if the default constructor is called.
/// </summary>
internal static readonly TimeSpan DefaultMaximumMessageAge = TimeSpan.FromMinutes(13);
/// <summary>
- /// Initializes a new instance of the <see cref="StandardMessageExpirationBindingElement"/> class
+ /// Initializes a new instance of the <see cref="StandardExpirationBindingElement"/> class
/// with a default maximum message lifetime of 13 minutes.
/// </summary>
- internal StandardMessageExpirationBindingElement()
+ internal StandardExpirationBindingElement()
: this(DefaultMaximumMessageAge) {
}
/// <summary>
- /// Initializes a new instance of the <see cref="StandardMessageExpirationBindingElement"/> class.
+ /// Initializes a new instance of the <see cref="StandardExpirationBindingElement"/> class.
/// </summary>
/// <param name="maximumAge">
/// <para>The maximum age a message implementing the
@@ -39,7 +39,7 @@ namespace DotNetOAuth.Messaging {
/// If a message should live for at least t = 3 minutes,
/// this property should be set to (2*d + t) = 13 minutes.</para>
/// </param>
- internal StandardMessageExpirationBindingElement(TimeSpan maximumAge) {
+ internal StandardExpirationBindingElement(TimeSpan maximumAge) {
this.MaximumMessageAge = maximumAge;
}
@@ -48,9 +48,9 @@ namespace DotNetOAuth.Messaging {
/// <summary>
/// Gets the protection offered by this binding element.
/// </summary>
- /// <value><see cref="ChannelProtection.Expiration"/></value>
- ChannelProtection IChannelBindingElement.Protection {
- get { return ChannelProtection.Expiration; }
+ /// <value><see cref="MessageProtection.Expiration"/></value>
+ MessageProtection IChannelBindingElement.Protection {
+ get { return MessageProtection.Expiration; }
}
#endregion
diff --git a/src/DotNetOAuth/Messaging/Channel.cs b/src/DotNetOAuth/Messaging/Channel.cs
index 5d52b23..3c91b25 100644
--- a/src/DotNetOAuth/Messaging/Channel.cs
+++ b/src/DotNetOAuth/Messaging/Channel.cs
@@ -64,6 +64,7 @@ namespace DotNetOAuth.Messaging {
/// <remarks>
/// Incoming messages should have the binding elements applied in reverse order.
/// </remarks>
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
private List<IChannelBindingElement> bindingElements = new List<IChannelBindingElement>();
/// <summary>
@@ -412,13 +413,13 @@ namespace DotNetOAuth.Messaging {
private static IEnumerable<IChannelBindingElement> ValidateAndPrepareBindingElements(IEnumerable<IChannelBindingElement> elements) {
// Filter the elements between the mere transforming ones and the protection ones.
var transformationElements = new List<IChannelBindingElement>(
- elements.Where(element => element.Protection == ChannelProtection.None));
+ elements.Where(element => element.Protection == MessageProtection.None));
var protectionElements = new List<IChannelBindingElement>(
- elements.Where(element => element.Protection != ChannelProtection.None));
+ elements.Where(element => element.Protection != MessageProtection.None));
bool wasLastProtectionPresent = true;
- foreach (ChannelProtection protectionKind in Enum.GetValues(typeof(ChannelProtection))) {
- if (protectionKind == ChannelProtection.None) {
+ foreach (MessageProtection protectionKind in Enum.GetValues(typeof(MessageProtection))) {
+ if (protectionKind == MessageProtection.None) {
continue;
}
@@ -464,8 +465,8 @@ namespace DotNetOAuth.Messaging {
/// 1 if <paramref name="element2"/> should be applied to an outgoing message before <paramref name="element1"/>.
/// 0 if it doesn't matter.
/// </returns>
- private static int BindingElementOutgoingMessageApplicationOrder(ChannelProtection protection1, ChannelProtection protection2) {
- Debug.Assert(protection1 != ChannelProtection.None && protection2 != ChannelProtection.None, "This comparison function should only be used to compare protection binding elements. Otherwise we change the order of user-defined message transformations.");
+ private static int BindingElementOutgoingMessageApplicationOrder(MessageProtection protection1, MessageProtection protection2) {
+ Debug.Assert(protection1 != MessageProtection.None && protection2 != MessageProtection.None, "This comparison function should only be used to compare protection binding elements. Otherwise we change the order of user-defined message transformations.");
// Now put the protection ones in the right order.
return -((int)protection1).CompareTo((int)protection2); // descending flag ordinal order
diff --git a/src/DotNetOAuth/Messaging/Exceptions.cd b/src/DotNetOAuth/Messaging/Exceptions.cd
new file mode 100644
index 0000000..f0e527b
--- /dev/null
+++ b/src/DotNetOAuth/Messaging/Exceptions.cd
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ClassDiagram MajorVersion="1" MinorVersion="1">
+ <Class Name="DotNetOAuth.Messaging.ExpiredMessageException">
+ <Position X="7.25" Y="2.25" Width="2" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\ExpiredMessageException.cs</FileName>
+ </TypeIdentifier>
+ </Class>
+ <Class Name="DotNetOAuth.Messaging.ProtocolException" Collapsed="true">
+ <Position X="9.75" Y="0.75" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAKAAAAAAAAQAAAAIBAAAAACAAAAAAAAACAAAAAAAA=</HashCode>
+ <FileName>Messaging\ProtocolException.cs</FileName>
+ </TypeIdentifier>
+ <Lollipop Position="0.2" />
+ </Class>
+ <Class Name="DotNetOAuth.Messaging.InvalidSignatureException" Collapsed="true">
+ <Position X="9.5" Y="2.25" Width="2" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\InvalidSignatureException.cs</FileName>
+ </TypeIdentifier>
+ </Class>
+ <Class Name="DotNetOAuth.Messaging.ReplayedMessageException" Collapsed="true">
+ <Position X="11.75" Y="2.25" Width="2.25" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\ReplayedMessageException.cs</FileName>
+ </TypeIdentifier>
+ </Class>
+ <Font Name="Segoe UI" Size="9" />
+</ClassDiagram> \ No newline at end of file
diff --git a/src/DotNetOAuth/Messaging/IChannelBindingElement.cs b/src/DotNetOAuth/Messaging/IChannelBindingElement.cs
index 5e72d36..b9f41f8 100644
--- a/src/DotNetOAuth/Messaging/IChannelBindingElement.cs
+++ b/src/DotNetOAuth/Messaging/IChannelBindingElement.cs
@@ -18,7 +18,7 @@ namespace DotNetOAuth.Messaging {
/// <summary>
/// Gets the protection offered (if any) by this binding element.
/// </summary>
- ChannelProtection Protection { get; }
+ MessageProtection Protection { get; }
/// <summary>
/// Prepares a message for sending based on the rules of this channel binding element.
diff --git a/src/DotNetOAuth/Messaging/IProtocolMessage.cs b/src/DotNetOAuth/Messaging/IProtocolMessage.cs
index 76079c0..61df813 100644
--- a/src/DotNetOAuth/Messaging/IProtocolMessage.cs
+++ b/src/DotNetOAuth/Messaging/IProtocolMessage.cs
@@ -17,7 +17,12 @@ namespace DotNetOAuth.Messaging {
/// <summary>
/// Gets the version of the protocol this message is prepared to implement.
/// </summary>
- Protocol Protocol { get; }
+ Version ProtocolVersion { get; }
+
+ /// <summary>
+ /// Gets the level of protection this message requires.
+ /// </summary>
+ MessageProtection RequiredProtection { get; }
/// <summary>
/// Gets whether this is a direct or indirect message.
diff --git a/src/DotNetOAuth/Messaging/ChannelProtection.cs b/src/DotNetOAuth/Messaging/MessageProtection.cs
index bbc619c..b87c12d 100644
--- a/src/DotNetOAuth/Messaging/ChannelProtection.cs
+++ b/src/DotNetOAuth/Messaging/MessageProtection.cs
@@ -1,5 +1,5 @@
//-----------------------------------------------------------------------
-// <copyright file="ChannelProtection.cs" company="Andrew Arnott">
+// <copyright file="MessageProtection.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
@@ -17,7 +17,7 @@ namespace DotNetOAuth.Messaging {
/// tamper protection to prevent a user from changing the timestamp on a message.
/// </remarks>
[Flags]
- internal enum ChannelProtection {
+ internal enum MessageProtection {
/// <summary>
/// No protection.
/// </summary>
diff --git a/src/DotNetOAuth/Messaging/Messaging.cd b/src/DotNetOAuth/Messaging/Messaging.cd
new file mode 100644
index 0000000..48106a8
--- /dev/null
+++ b/src/DotNetOAuth/Messaging/Messaging.cd
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ClassDiagram MajorVersion="1" MinorVersion="1" GroupingSetting="Access">
+ <Class Name="DotNetOAuth.Messaging.Channel">
+ <Position X="5.25" Y="0.75" Width="1.75" />
+ <Compartments>
+ <Compartment Name="Protected" Collapsed="true" />
+ <Compartment Name="Internal" Collapsed="true" />
+ <Compartment Name="Private" Collapsed="true" />
+ <Compartment Name="Fields" Collapsed="true" />
+ </Compartments>
+ <TypeIdentifier>
+ <HashCode>gBgQgAIAAQAEAIgAAEAAAARBIAAQgAAQEEAAAABAMAA=</HashCode>
+ <FileName>Messaging\Channel.cs</FileName>
+ </TypeIdentifier>
+ <ShowAsCollectionAssociation>
+ <Property Name="BindingElements" />
+ </ShowAsCollectionAssociation>
+ </Class>
+ <Interface Name="DotNetOAuth.Messaging.IChannelBindingElement">
+ <Position X="1.75" Y="1.5" Width="2.25" />
+ <TypeIdentifier>
+ <HashCode>BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAEAAAAAAAAA=</HashCode>
+ <FileName>Messaging\IChannelBindingElement.cs</FileName>
+ </TypeIdentifier>
+ <ShowAsAssociation>
+ <Property Name="Protection" />
+ </ShowAsAssociation>
+ </Interface>
+ <Interface Name="DotNetOAuth.Messaging.IProtocolMessage">
+ <Position X="5.25" Y="3.5" Width="1.75" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAQAAAAAAAAAAAAAYAAAAAAAAAAAACAAAAAAA=</HashCode>
+ <FileName>Messaging\IProtocolMessage.cs</FileName>
+ </TypeIdentifier>
+ <ShowAsAssociation>
+ <Property Name="RequiredProtection" />
+ <Property Name="Transport" />
+ </ShowAsAssociation>
+ </Interface>
+ <Interface Name="DotNetOAuth.Messaging.IDirectedProtocolMessage">
+ <Position X="5" Y="5.25" Width="2.25" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\IDirectedProtocolMessage.cs</FileName>
+ </TypeIdentifier>
+ </Interface>
+ <Enum Name="DotNetOAuth.Messaging.MessageProtection">
+ <Position X="2" Y="3.5" Width="1.75" />
+ <TypeIdentifier>
+ <HashCode>AIAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAA=</HashCode>
+ <FileName>Messaging\MessageProtection.cs</FileName>
+ </TypeIdentifier>
+ </Enum>
+ <Enum Name="DotNetOAuth.Messaging.MessageTransport">
+ <Position X="8" Y="3.5" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAACAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <FileName>Messaging\MessageTransport.cs</FileName>
+ </TypeIdentifier>
+ </Enum>
+ <Font Name="Segoe UI" Size="9" />
+</ClassDiagram> \ No newline at end of file
diff --git a/src/DotNetOAuth/Messaging/ProtocolException.cs b/src/DotNetOAuth/Messaging/ProtocolException.cs
index d7c3675..05ff340 100644
--- a/src/DotNetOAuth/Messaging/ProtocolException.cs
+++ b/src/DotNetOAuth/Messaging/ProtocolException.cs
@@ -120,16 +120,23 @@ namespace DotNetOAuth.Messaging {
/// <summary>
/// Gets the version of the protocol this message is prepared to implement.
/// </summary>
- Protocol IProtocolMessage.Protocol {
+ Version IProtocolMessage.ProtocolVersion {
get {
if (this.inResponseTo == null) {
throw new InvalidOperationException(MessagingStrings.ExceptionNotConstructedForTransit);
}
- return this.inResponseTo.Protocol;
+ return this.inResponseTo.ProtocolVersion;
}
}
/// <summary>
+ /// Gets the level of protection this exception requires when transmitted as a message.
+ /// </summary>
+ MessageProtection IProtocolMessage.RequiredProtection {
+ get { return MessageProtection.None; }
+ }
+
+ /// <summary>
/// Gets whether this is a direct or indirect message.
/// </summary>
MessageTransport IProtocolMessage.Transport {