summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandler.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandler.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandler.cs b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandler.cs
index cfbb70e..a763d5e 100644
--- a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandler.cs
+++ b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/OAuth1HttpMessageHandler.cs
@@ -1,4 +1,10 @@
-namespace DotNetOpenAuth.OAuth {
+//-----------------------------------------------------------------------
+// <copyright file="OAuth1HttpMessageHandler.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.OAuth {
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,6 +17,9 @@
using Validation;
+ /// <summary>
+ /// A delegated HTTP handler that automatically signs outgoing requests.
+ /// </summary>
public class OAuth1HttpMessageHandler : DelegatingHandler {
/// <summary>
/// Initializes a new instance of the <see cref="OAuth1HttpMessageHandler" /> class.
@@ -34,10 +43,30 @@
this.AccessToken = accessToken;
}
+ /// <summary>
+ /// Gets or sets the access token.
+ /// </summary>
+ /// <value>
+ /// The access token.
+ /// </value>
public string AccessToken { get; set; }
+ /// <summary>
+ /// Gets or sets the consumer.
+ /// </summary>
+ /// <value>
+ /// The consumer.
+ /// </value>
public ConsumerBase Consumer { get; set; }
+ /// <summary>
+ /// Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.
+ /// </summary>
+ /// <param name="request">The HTTP request message to send to the server.</param>
+ /// <param name="cancellationToken">A cancellation token to cancel operation.</param>
+ /// <returns>
+ /// Returns <see cref="T:System.Threading.Tasks.Task`1" />. The task object representing the asynchronous operation.
+ /// </returns>
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) {
Verify.Operation(this.Consumer != null, Strings.RequiredPropertyNotYetPreset, "Consumer");
Verify.Operation(!string.IsNullOrEmpty(this.AccessToken), Strings.RequiredPropertyNotYetPreset, "AccessToken");