diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-01 21:33:22 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-01 21:33:22 -0800 |
commit | d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8 (patch) | |
tree | 93004acbee42d003dc38674fc50826d0d440583b /samples/OAuth2ProtectedWebApi/App_Start/WebApiConfig.cs | |
parent | 6204dcf07f31b78478bc1ddb55a6ca9027617b67 (diff) | |
parent | 74b6b4efd2be2680e3067f716829b0c9385ceebe (diff) | |
download | DotNetOpenAuth-d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8.zip DotNetOpenAuth-d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8.tar.gz DotNetOpenAuth-d4d806fbcc1c7cdc86ec8234c5792bbaf667d5a8.tar.bz2 |
Merge branch 'httpclient' into OAuthSimple
Diffstat (limited to 'samples/OAuth2ProtectedWebApi/App_Start/WebApiConfig.cs')
-rw-r--r-- | samples/OAuth2ProtectedWebApi/App_Start/WebApiConfig.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/samples/OAuth2ProtectedWebApi/App_Start/WebApiConfig.cs b/samples/OAuth2ProtectedWebApi/App_Start/WebApiConfig.cs new file mode 100644 index 0000000..d783d13 --- /dev/null +++ b/samples/OAuth2ProtectedWebApi/App_Start/WebApiConfig.cs @@ -0,0 +1,20 @@ +namespace OAuth2ProtectedWebApi { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Web.Http; + + using OAuth2ProtectedWebApi.Code; + + public static class WebApiConfig { + public static void Register(HttpConfiguration config) { + config.Routes.MapHttpRoute( + name: "DefaultApi", + routeTemplate: "api/{controller}/{id}", + defaults: new { id = RouteParameter.Optional } + ); + + config.MessageHandlers.Add(new BearerTokenHandler()); + } + } +} |