summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-11-10 17:08:56 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-11-10 17:08:56 -0800
commitb66550c6259a972b9871c41f18ea5b1b4466f02e (patch)
tree03905752e0e25ca39b7ac97d151951363414c48e /src
parent85d082f0046c4266e5571ea38c8ac27f47db8f45 (diff)
downloadDotNetOpenAuth-b66550c6259a972b9871c41f18ea5b1b4466f02e.zip
DotNetOpenAuth-b66550c6259a972b9871c41f18ea5b1b4466f02e.tar.gz
DotNetOpenAuth-b66550c6259a972b9871c41f18ea5b1b4466f02e.tar.bz2
Adds AuthorizationServer.HandleTokenRequest(HttpRequestMessage) overload.
Fixes #210
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs
index 6a96c2d..1e404e7 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs
@@ -10,6 +10,9 @@ namespace DotNetOpenAuth.OAuth2 {
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Linq;
+#if CLR4
+ using System.Net.Http;
+#endif
using System.Security.Cryptography;
using System.Text;
using System.Web;
@@ -129,6 +132,17 @@ namespace DotNetOpenAuth.OAuth2 {
this.Channel.Respond(response);
}
+#if CLR4
+ /// <summary>
+ /// Handles an incoming request to the authorization server's token endpoint.
+ /// </summary>
+ /// <param name="request">The HTTP request.</param>
+ /// <returns>The HTTP response to send to the client.</returns>
+ public OutgoingWebResponse HandleTokenRequest(HttpRequestMessage request) {
+ return this.HandleTokenRequest(new HttpRequestInfo(request));
+ }
+#endif
+
/// <summary>
/// Handles an incoming request to the authorization server's token endpoint.
/// </summary>