diff options
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/ProtocolFaultResponseException.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/ProtocolFaultResponseException.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/ProtocolFaultResponseException.cs b/src/DotNetOpenAuth.Core/Messaging/ProtocolFaultResponseException.cs index c2dc34e..b5cab3b 100644 --- a/src/DotNetOpenAuth.Core/Messaging/ProtocolFaultResponseException.cs +++ b/src/DotNetOpenAuth.Core/Messaging/ProtocolFaultResponseException.cs @@ -8,7 +8,11 @@ namespace DotNetOpenAuth.Messaging { using System; using System.Collections.Generic; using System.Linq; + using System.Net.Http; using System.Text; + using System.Threading; + using System.Threading.Tasks; + using Validation; /// <summary> /// An exception to represent errors in the local or remote implementation of the protocol @@ -60,10 +64,12 @@ namespace DotNetOpenAuth.Messaging { /// <summary> /// Creates the HTTP response to forward to the client to report the error. /// </summary> - /// <returns>The HTTP response.</returns> - public OutgoingWebResponse CreateErrorResponse() { - var response = this.channel.PrepareResponse(this.ErrorResponseMessage); - return response; + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns> + /// The HTTP response. + /// </returns> + public Task<HttpResponseMessage> CreateErrorResponseAsync(CancellationToken cancellationToken) { + return this.channel.PrepareResponseAsync(this.ErrorResponseMessage, cancellationToken); } } } |