summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth.Consumer/OAuth
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.OAuth.Consumer/OAuth')
-rw-r--r--src/DotNetOpenAuth.OAuth.Consumer/OAuth/ChannelElements/OAuthConsumerChannel.cs3
-rw-r--r--src/DotNetOpenAuth.OAuth.Consumer/OAuth/ConsumerBase.cs7
-rw-r--r--src/DotNetOpenAuth.OAuth.Consumer/OAuth/DesktopConsumer.cs8
-rw-r--r--src/DotNetOpenAuth.OAuth.Consumer/OAuth/WebConsumer.cs7
4 files changed, 21 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ChannelElements/OAuthConsumerChannel.cs b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ChannelElements/OAuthConsumerChannel.cs
index 3ed05f8..a10ff09 100644
--- a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ChannelElements/OAuthConsumerChannel.cs
+++ b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ChannelElements/OAuthConsumerChannel.cs
@@ -19,13 +19,14 @@ namespace DotNetOpenAuth.OAuth.ChannelElements {
/// </summary>
internal class OAuthConsumerChannel : OAuthChannel {
/// <summary>
- /// Initializes a new instance of the <see cref="OAuthConsumerChannel"/> class.
+ /// Initializes a new instance of the <see cref="OAuthConsumerChannel" /> class.
/// </summary>
/// <param name="signingBindingElement">The binding element to use for signing.</param>
/// <param name="store">The web application store to use for nonces.</param>
/// <param name="tokenManager">The token manager instance to use.</param>
/// <param name="securitySettings">The security settings.</param>
/// <param name="messageFactory">The message factory.</param>
+ /// <param name="hostFactories">The host factories.</param>
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Diagnostics.Contracts.__ContractsRuntime.Requires<System.ArgumentNullException>(System.Boolean,System.String,System.String)", Justification = "Code contracts"), SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "securitySettings", Justification = "Code contracts")]
internal OAuthConsumerChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, IConsumerTokenManager tokenManager, ConsumerSecuritySettings securitySettings, IMessageFactory messageFactory = null, IHostFactories hostFactories = null)
: base(
diff --git a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ConsumerBase.cs b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ConsumerBase.cs
index b59b438..afb4c95 100644
--- a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ConsumerBase.cs
+++ b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/ConsumerBase.cs
@@ -90,6 +90,7 @@ namespace DotNetOpenAuth.OAuth {
/// Obtains an access token for a new account at the Service Provider via 2-legged OAuth.
/// </summary>
/// <param name="requestParameters">Any applicable parameters to include in the query string of the token request.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The access token.</returns>
/// <remarks>
/// The token secret is stored in the <see cref="TokenManager"/>.
@@ -120,6 +121,7 @@ namespace DotNetOpenAuth.OAuth {
/// </summary>
/// <param name="endpoint">The URL and method on the Service Provider to send the request to.</param>
/// <param name="accessToken">The access token that permits access to the protected resource.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The initialized WebRequest object.</returns>
public Task<HttpRequestMessage> PrepareAuthorizedRequestAsync(MessageReceivingEndpoint endpoint, string accessToken, CancellationToken cancellationToken = default(CancellationToken)) {
Requires.NotNull(endpoint, "endpoint");
@@ -135,6 +137,7 @@ namespace DotNetOpenAuth.OAuth {
/// <param name="endpoint">The URL and method on the Service Provider to send the request to.</param>
/// <param name="accessToken">The access token that permits access to the protected resource.</param>
/// <param name="extraData">Extra parameters to include in the message. Must not be null, but may be empty.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The initialized WebRequest object.</returns>
public Task<HttpRequestMessage> PrepareAuthorizedRequestAsync(MessageReceivingEndpoint endpoint, string accessToken, IDictionary<string, string> extraData, CancellationToken cancellationToken = default(CancellationToken)) {
Requires.NotNull(endpoint, "endpoint");
@@ -155,6 +158,7 @@ namespace DotNetOpenAuth.OAuth {
/// <param name="endpoint">The URL and method on the Service Provider to send the request to.</param>
/// <param name="accessToken">The access token that permits access to the protected resource.</param>
/// <param name="binaryData">Extra parameters to include in the message. Must not be null, but may be empty.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The initialized WebRequest object.</returns>
public Task<HttpRequestMessage> PrepareAuthorizedRequestAsync(MessageReceivingEndpoint endpoint, string accessToken, IEnumerable<MultipartContentMember> binaryData, CancellationToken cancellationToken = default(CancellationToken)) {
Requires.NotNull(endpoint, "endpoint");
@@ -171,6 +175,7 @@ namespace DotNetOpenAuth.OAuth {
/// Prepares an HTTP request that has OAuth authorization already attached to it.
/// </summary>
/// <param name="message">The OAuth authorization message to attach to the HTTP request.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The HttpWebRequest that can be used to send the HTTP request to the remote service provider.
/// </returns>
@@ -230,6 +235,7 @@ namespace DotNetOpenAuth.OAuth {
/// <param name="requestParameters">Extra parameters to add to the request token message. Optional.</param>
/// <param name="redirectParameters">Extra parameters to add to the redirect to Service Provider message. Optional.</param>
/// <param name="requestToken">The request token that must be exchanged for an access token after the user has provided authorization.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The pending user agent redirect based message to be sent as an HttpResponse.</returns>
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "3#", Justification = "Two results")]
protected internal async Task<UserAuthorizationRequest> PrepareRequestUserAuthorizationAsync(Uri callback, IDictionary<string, string> requestParameters, IDictionary<string, string> redirectParameters, CancellationToken cancellationToken = default(CancellationToken)) {
@@ -265,6 +271,7 @@ namespace DotNetOpenAuth.OAuth {
/// </summary>
/// <param name="requestToken">The request token that the user has authorized.</param>
/// <param name="verifier">The verifier code.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The access token assigned by the Service Provider.
/// </returns>
diff --git a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/DesktopConsumer.cs b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/DesktopConsumer.cs
index cd16c7e..a1bfd2d 100644
--- a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/DesktopConsumer.cs
+++ b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/DesktopConsumer.cs
@@ -37,8 +37,10 @@ namespace DotNetOpenAuth.OAuth {
/// </summary>
/// <param name="requestParameters">Extra parameters to add to the request token message. Optional.</param>
/// <param name="redirectParameters">Extra parameters to add to the redirect to Service Provider message. Optional.</param>
- /// <param name="requestToken">The request token that must be exchanged for an access token after the user has provided authorization.</param>
- /// <returns>The URL to open a browser window to allow the user to provide authorization and the request token.</returns>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>
+ /// The URL to open a browser window to allow the user to provide authorization and the request token.
+ /// </returns>
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "Two results")]
public async Task<Tuple<Uri, string>> RequestUserAuthorizationAsync(IDictionary<string, string> requestParameters, IDictionary<string, string> redirectParameters, CancellationToken cancellationToken = default(CancellationToken)) {
var message = await this.PrepareRequestUserAuthorizationAsync(null, requestParameters, redirectParameters, cancellationToken);
@@ -50,6 +52,7 @@ namespace DotNetOpenAuth.OAuth {
/// Exchanges a given request token for access token.
/// </summary>
/// <param name="requestToken">The request token that the user has authorized.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The access token assigned by the Service Provider.</returns>
[Obsolete("Use the ProcessUserAuthorization method that takes a verifier parameter instead.")]
public Task<AuthorizedTokenResponse> ProcessUserAuthorizationAsync(string requestToken, CancellationToken cancellationToken = default(CancellationToken)) {
@@ -61,6 +64,7 @@ namespace DotNetOpenAuth.OAuth {
/// </summary>
/// <param name="requestToken">The request token that the user has authorized.</param>
/// <param name="verifier">The verifier code typed in by the user. Must not be <c>Null</c> for OAuth 1.0a service providers and later.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The access token assigned by the Service Provider.
/// </returns>
diff --git a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/WebConsumer.cs b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/WebConsumer.cs
index b395b5a..75a1217 100644
--- a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/WebConsumer.cs
+++ b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/WebConsumer.cs
@@ -37,6 +37,7 @@ namespace DotNetOpenAuth.OAuth {
/// to provide that authorization. Upon successful authorization, the user is redirected
/// back to the current page.
/// </summary>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The pending user agent redirect based message to be sent as an HttpResponse.</returns>
/// <remarks>
/// Requires HttpContext.Current.
@@ -56,6 +57,7 @@ namespace DotNetOpenAuth.OAuth {
/// </param>
/// <param name="requestParameters">Extra parameters to add to the request token message. Optional.</param>
/// <param name="redirectParameters">Extra parameters to add to the redirect to Service Provider message. Optional.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The pending user agent redirect based message to be sent as an HttpResponse.</returns>
public Task<UserAuthorizationRequest> PrepareRequestUserAuthorizationAsync(Uri callback, IDictionary<string, string> requestParameters, IDictionary<string, string> redirectParameters, CancellationToken cancellationToken = default(CancellationToken)) {
return base.PrepareRequestUserAuthorizationAsync(callback, requestParameters, redirectParameters, cancellationToken);
@@ -65,7 +67,10 @@ namespace DotNetOpenAuth.OAuth {
/// Processes an incoming authorization-granted message from an SP and obtains an access token.
/// </summary>
/// <param name="request">The incoming HTTP request.</param>
- /// <returns>The access token, or null if no incoming authorization message was recognized.</returns>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>
+ /// The access token, or null if no incoming authorization message was recognized.
+ /// </returns>
public async Task<AuthorizedTokenResponse> ProcessUserAuthorizationAsync(HttpRequestBase request = null, CancellationToken cancellationToken = default(CancellationToken)) {
request = request ?? this.Channel.GetRequestFromContext();