summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/OAuthChannel.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-02 16:18:15 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-02 16:18:15 -0700
commit0cb15a44b3b5f818a402046f13bc217a8a1e8b22 (patch)
tree5d9872f7e00ab63bff413dff764a77a1bd8db038 /src/DotNetOAuth/OAuthChannel.cs
parent202448b1fd4d0c15d009b2c0a6713c8fc41f8854 (diff)
downloadDotNetOpenAuth-0cb15a44b3b5f818a402046f13bc217a8a1e8b22.zip
DotNetOpenAuth-0cb15a44b3b5f818a402046f13bc217a8a1e8b22.tar.gz
DotNetOpenAuth-0cb15a44b3b5f818a402046f13bc217a8a1e8b22.tar.bz2
Finished implementing the common channel sending scenarios.
Diffstat (limited to 'src/DotNetOAuth/OAuthChannel.cs')
-rw-r--r--src/DotNetOAuth/OAuthChannel.cs29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/DotNetOAuth/OAuthChannel.cs b/src/DotNetOAuth/OAuthChannel.cs
index ddfc56d..9a066ff 100644
--- a/src/DotNetOAuth/OAuthChannel.cs
+++ b/src/DotNetOAuth/OAuthChannel.cs
@@ -13,6 +13,9 @@ namespace DotNetOAuth {
using System.Web;
using DotNetOAuth.Messaging;
+ /// <summary>
+ /// An OAuth-specific implementation of the <see cref="Channel"/> class.
+ /// </summary>
internal class OAuthChannel : Channel {
/// <summary>
/// Initializes a new instance of the <see cref="OAuthChannel"/> class.
@@ -25,6 +28,14 @@ namespace DotNetOAuth {
: base(messageTypeProvider) {
}
+ /// <summary>
+ /// Queues a message for sending in the response stream where the fields
+ /// are sent in the response stream in querystring style.
+ /// </summary>
+ /// <param name="response">The message to send as a response.</param>
+ /// <remarks>
+ /// This method implements spec V1.0 section 5.3.
+ /// </remarks>
protected override void SendDirectMessageResponse(IProtocolMessage response) {
MessageSerializer serializer = MessageSerializer.Get(response.GetType());
var fields = serializer.Serialize(response);
@@ -39,6 +50,11 @@ namespace DotNetOAuth {
this.QueueIndirectOrResponseMessage(encodedResponse);
}
+ /// <summary>
+ /// Sends a direct message to a remote party and waits for the response.
+ /// </summary>
+ /// <param name="request">The message to send.</param>
+ /// <returns>The remote party's response.</returns>
protected override IProtocolMessage Request(IDirectedProtocolMessage request) {
if (request == null) {
throw new ArgumentNullException("request");
@@ -81,14 +97,19 @@ namespace DotNetOAuth {
return responseMessage;
}
- protected override void SendIndirectMessage(IDirectedProtocolMessage message) {
- throw new NotImplementedException();
- }
-
+ /// <summary>
+ /// Reports an error to the user via the user agent.
+ /// </summary>
+ /// <param name="exception">The error information.</param>
protected override void ReportErrorToUser(ProtocolException exception) {
throw new NotImplementedException();
}
+ /// <summary>
+ /// Sends an error result directly to the calling remote party according to the
+ /// rules of the protocol.
+ /// </summary>
+ /// <param name="exception">The error information.</param>
protected override void ReportErrorAsDirectResponse(ProtocolException exception) {
throw new NotImplementedException();
}