summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/Bindings/HardCodedKeyCryptoKeyStore.cs8
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/Channel.cs29
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/HttpRequestInfo.cs2
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/HttpResponseMessageWithOriginal.cs8
4 files changed, 34 insertions, 13 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/Bindings/HardCodedKeyCryptoKeyStore.cs b/src/DotNetOpenAuth.Core/Messaging/Bindings/HardCodedKeyCryptoKeyStore.cs
index c828616..9bea16f 100644
--- a/src/DotNetOpenAuth.Core/Messaging/Bindings/HardCodedKeyCryptoKeyStore.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/Bindings/HardCodedKeyCryptoKeyStore.cs
@@ -55,7 +55,7 @@ namespace DotNetOpenAuth.Messaging.Bindings {
/// </returns>
public CryptoKey GetKey(string bucket, string handle) {
if (handle == HardCodedKeyHandle) {
- return OneCryptoKey;
+ return this.OneCryptoKey;
}
return null;
@@ -69,7 +69,7 @@ namespace DotNetOpenAuth.Messaging.Bindings {
/// A sequence of handles and keys, ordered by descending <see cref="CryptoKey.ExpiresUtc" />.
/// </returns>
public IEnumerable<KeyValuePair<string, CryptoKey>> GetKeys(string bucket) {
- return new[] { new KeyValuePair<string, CryptoKey>(HardCodedKeyHandle, OneCryptoKey) };
+ return new[] { new KeyValuePair<string, CryptoKey>(HardCodedKeyHandle, this.OneCryptoKey) };
}
/// <summary>
@@ -78,7 +78,7 @@ namespace DotNetOpenAuth.Messaging.Bindings {
/// <param name="bucket">The name of the bucket to store the key in. Case sensitive.</param>
/// <param name="handle">The handle to the key, unique within the bucket. Case sensitive.</param>
/// <param name="key">The key to store.</param>
- /// <exception cref="System.NotSupportedException"></exception>
+ /// <exception cref="System.NotSupportedException">Always thrown.</exception>
public void StoreKey(string bucket, string handle, CryptoKey key) {
throw new NotSupportedException();
}
@@ -88,7 +88,7 @@ namespace DotNetOpenAuth.Messaging.Bindings {
/// </summary>
/// <param name="bucket">The bucket name. Case sensitive.</param>
/// <param name="handle">The key handle. Case sensitive.</param>
- /// <exception cref="System.NotSupportedException"></exception>
+ /// <exception cref="System.NotSupportedException">Always thrown.</exception>
public void RemoveKey(string bucket, string handle) {
throw new NotSupportedException();
}
diff --git a/src/DotNetOpenAuth.Core/Messaging/Channel.cs b/src/DotNetOpenAuth.Core/Messaging/Channel.cs
index 9414166..0ffe2a6 100644
--- a/src/DotNetOpenAuth.Core/Messaging/Channel.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/Channel.cs
@@ -221,6 +221,22 @@ namespace DotNetOpenAuth.Messaging {
}
/// <summary>
+ /// Gets or sets the outgoing message filter.
+ /// </summary>
+ /// <value>
+ /// The outgoing message filter.
+ /// </value>
+ internal Action<IProtocolMessage> OutgoingMessageFilter { get; set; }
+
+ /// <summary>
+ /// Gets or sets the incoming message filter.
+ /// </summary>
+ /// <value>
+ /// The incoming message filter.
+ /// </value>
+ internal Action<IProtocolMessage> IncomingMessageFilter { get; set; }
+
+ /// <summary>
/// Gets the binding elements used by this channel, in no particular guaranteed order.
/// </summary>
protected internal ReadOnlyCollection<IChannelBindingElement> BindingElements {
@@ -327,8 +343,8 @@ namespace DotNetOpenAuth.Messaging {
/// Gets the protocol message embedded in the given HTTP request, if present.
/// </summary>
/// <typeparam name="TRequest">The expected type of the message to be received.</typeparam>
- /// <param name="cancellationToken">The cancellation token.</param>
/// <param name="httpRequest">The request to search for an embedded message.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// True if the expected message was recognized and deserialized. False otherwise.
/// </returns>
@@ -352,8 +368,8 @@ namespace DotNetOpenAuth.Messaging {
/// Gets the protocol message embedded in the given HTTP request.
/// </summary>
/// <typeparam name="TRequest">The expected type of the message to be received.</typeparam>
- /// <param name="cancellationToken">The cancellation token.</param>
/// <param name="httpRequest">The request to search for an embedded message.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The deserialized message. Never null.
/// </returns>
@@ -503,7 +519,10 @@ namespace DotNetOpenAuth.Messaging {
/// Gets the protocol message that may be in the given HTTP response.
/// </summary>
/// <param name="response">The response that is anticipated to contain an protocol message.</param>
- /// <returns>The deserialized message parts, if found. Null otherwise.</returns>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>
+ /// The deserialized message parts, if found. Null otherwise.
+ /// </returns>
/// <exception cref="ProtocolException">Thrown when the response is not valid.</exception>
internal Task<IDictionary<string, string>> ReadFromResponseCoreAsyncTestHook(HttpResponseMessage response, CancellationToken cancellationToken) {
return this.ReadFromResponseCoreAsync(response, cancellationToken);
@@ -975,10 +994,6 @@ namespace DotNetOpenAuth.Messaging {
return dictionary;
}
- internal Action<IProtocolMessage> OutgoingMessageFilter { get; set; }
-
- internal Action<IProtocolMessage> IncomingMessageFilter { get; set; }
-
/// <summary>
/// Prepares a message for transmit by applying signatures, nonces, etc.
/// </summary>
diff --git a/src/DotNetOpenAuth.Core/Messaging/HttpRequestInfo.cs b/src/DotNetOpenAuth.Core/Messaging/HttpRequestInfo.cs
index 924a3c2..ba1faab 100644
--- a/src/DotNetOpenAuth.Core/Messaging/HttpRequestInfo.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/HttpRequestInfo.cs
@@ -267,7 +267,7 @@ namespace DotNetOpenAuth.Messaging {
/// When overridden in a derived class, gets or sets the MIME content type of the request.
/// </summary>
/// <returns>The MIME content type of the request, such as "text/html".</returns>
- /// <exception cref="System.NotImplementedException"></exception>
+ /// <exception cref="System.NotImplementedException">Setter always throws</exception>
public override string ContentType {
get { return this.Headers["Content-Type"]; }
set { throw new NotImplementedException(); }
diff --git a/src/DotNetOpenAuth.Core/Messaging/HttpResponseMessageWithOriginal.cs b/src/DotNetOpenAuth.Core/Messaging/HttpResponseMessageWithOriginal.cs
index 4db9f63..c6d2cc3 100644
--- a/src/DotNetOpenAuth.Core/Messaging/HttpResponseMessageWithOriginal.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/HttpResponseMessageWithOriginal.cs
@@ -10,6 +10,12 @@ namespace DotNetOpenAuth.Messaging {
using Validation;
+ /// <summary>
+ /// An HttpResponseMessage that includes the original DNOA semantic message as a property.
+ /// </summary>
+ /// <remarks>
+ /// This is used to assist in testing.
+ /// </remarks>
internal class HttpResponseMessageWithOriginal : HttpResponseMessage {
/// <summary>
/// Initializes a new instance of the <see cref="HttpResponseMessageWithOriginal"/> class.
@@ -18,7 +24,7 @@ namespace DotNetOpenAuth.Messaging {
/// <param name="statusCode">The status code.</param>
internal HttpResponseMessageWithOriginal(IMessage originalMessage, HttpStatusCode statusCode = HttpStatusCode.OK)
: base(statusCode) {
- OriginalMessage = originalMessage;
+ this.OriginalMessage = originalMessage;
Requires.NotNull(originalMessage, "originalMessage");
}