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/Views | |
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/Views')
6 files changed, 160 insertions, 0 deletions
diff --git a/samples/OAuth2ProtectedWebApi/Views/Home/Index.cshtml b/samples/OAuth2ProtectedWebApi/Views/Home/Index.cshtml new file mode 100644 index 0000000..9d0b4a9 --- /dev/null +++ b/samples/OAuth2ProtectedWebApi/Views/Home/Index.cshtml @@ -0,0 +1,53 @@ +<header> + <div class="content-wrapper"> + <div class="float-left"> + <p class="site-title"> + <a href="~/">ASP.NET Web API</a></p> + </div> + </div> +</header> +<div id="body"> + <section class="featured"> + <div class="content-wrapper"> + <hgroup class="title"> + <h1>Welcome to ASP.NET Web API!</h1> + <h2>Modify the code in this template to jump-start your ASP.NET Web API development.</h2> + </hgroup> + <p> + ASP.NET Web API allows you to expose your applications, data and services to the + web directly over HTTP. + </p> + <p> + To learn more about ASP.NET Web API visit + <a href="http://go.microsoft.com/fwlink/?LinkID=238195" title="ASP.NET Web API Website">http://asp.net/web-api</a>. + The page features <mark>videos, tutorials, and samples</mark> to help you get the most from ASP.NET Web API. + If you have any questions about ASP.NET Web API, visit + <a href="http://go.microsoft.com/fwlink/?LinkID=238196" title="ASP.NET Web API Forum">our forums</a>. + </p> + </div> + </section> + <section class="content-wrapper main-content clear-fix"> + <h3>We suggest the following steps:</h3> + <ol class="round"> + <li class="one"> + <h5>Getting Started</h5> + ASP.NET Web API is a framework that makes it easy to build HTTP services that reach + a broad range of clients, including browsers and mobile devices. ASP.NET Web API + is an ideal platform for building RESTful applications on the .NET Framework. + <a href="http://go.microsoft.com/fwlink/?LinkId=245160">Learn more…</a> + </li> + + <li class="two"> + <h5>Add NuGet packages and jump-start your coding</h5> + NuGet makes it easy to install and update free libraries and tools. + <a href="http://go.microsoft.com/fwlink/?LinkId=245161">Learn more…</a> + </li> + <li class="three"> + <h5>Find Web Hosting</h5> + You can easily find a web hosting company that offers the right mix of features + and price for your applications. + <a href="http://go.microsoft.com/fwlink/?LinkId=245164">Learn more…</a> + </li> + </ol> + </section> +</div> diff --git a/samples/OAuth2ProtectedWebApi/Views/Shared/Error.cshtml b/samples/OAuth2ProtectedWebApi/Views/Shared/Error.cshtml new file mode 100644 index 0000000..54c5886 --- /dev/null +++ b/samples/OAuth2ProtectedWebApi/Views/Shared/Error.cshtml @@ -0,0 +1,16 @@ +@{ + Layout = null; +} + +<!DOCTYPE html> +<html> +<head> + <meta name="viewport" content="width=device-width" /> + <title>Error</title> +</head> +<body> + <h2> + Sorry, an error occurred while processing your request. + </h2> +</body> +</html>
\ No newline at end of file diff --git a/samples/OAuth2ProtectedWebApi/Views/Shared/_Layout.cshtml b/samples/OAuth2ProtectedWebApi/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..cdd3281 --- /dev/null +++ b/samples/OAuth2ProtectedWebApi/Views/Shared/_Layout.cshtml @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width" /> + <title>@ViewBag.Title</title> + @Styles.Render("~/Content/css") + @Scripts.Render("~/bundles/modernizr") +</head> +<body> + @RenderBody() + + @Scripts.Render("~/bundles/jquery") + @RenderSection("scripts", required: false) +</body> +</html> diff --git a/samples/OAuth2ProtectedWebApi/Views/User/Authorize.cshtml b/samples/OAuth2ProtectedWebApi/Views/User/Authorize.cshtml new file mode 100644 index 0000000..0664741 --- /dev/null +++ b/samples/OAuth2ProtectedWebApi/Views/User/Authorize.cshtml @@ -0,0 +1,13 @@ +@{ + ViewBag.Title = "Authorize"; + Layout = "~/Views/Shared/_Layout.cshtml"; +} + +<h2>Authorize</h2> + +@using (Html.BeginForm("Respond", "User", FormMethod.Post)) { + @AntiForgery.GetHtml() + @Html.Hidden("request", this.ViewData["request"]) + <input type="submit" name="approval" value="true" /> + <input type="submit" name="approval" value="false" /> +}
\ No newline at end of file diff --git a/samples/OAuth2ProtectedWebApi/Views/Web.config b/samples/OAuth2ProtectedWebApi/Views/Web.config new file mode 100644 index 0000000..aa52615 --- /dev/null +++ b/samples/OAuth2ProtectedWebApi/Views/Web.config @@ -0,0 +1,59 @@ +<?xml version="1.0"?> + +<configuration> + <configSections> + <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> + <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> + <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> + </sectionGroup> + </configSections> + + <system.web.webPages.razor> + <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> + <pages pageBaseType="System.Web.Mvc.WebViewPage"> + <namespaces> + <add namespace="System.Web.Mvc" /> + <add namespace="System.Web.Mvc.Ajax" /> + <add namespace="System.Web.Mvc.Html" /> + <add namespace="System.Web.Optimization"/> + <add namespace="System.Web.Routing" /> + </namespaces> + </pages> + </system.web.webPages.razor> + + <appSettings> + <add key="webpages:Enabled" value="false" /> + </appSettings> + + <system.web> + <httpHandlers> + <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/> + </httpHandlers> + + <!-- + Enabling request validation in view pages would cause validation to occur + after the input has already been processed by the controller. By default + MVC performs request validation before a controller processes the input. + To change this behavior apply the ValidateInputAttribute to a + controller or action. + --> + <pages + validateRequest="false" + pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" + pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" + userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> + <controls> + <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> + </controls> + </pages> + </system.web> + + <system.webServer> + <validation validateIntegratedModeConfiguration="false" /> + + <handlers> + <remove name="BlockViewHandler"/> + <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> + </handlers> + </system.webServer> +</configuration> diff --git a/samples/OAuth2ProtectedWebApi/Views/_ViewStart.cshtml b/samples/OAuth2ProtectedWebApi/Views/_ViewStart.cshtml new file mode 100644 index 0000000..efda124 --- /dev/null +++ b/samples/OAuth2ProtectedWebApi/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "~/Views/Shared/_Layout.cshtml"; +}
\ No newline at end of file |