Skip to content

Commit

Permalink
add webforms client
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Feb 13, 2016
1 parent 5e19b0a commit edfa6af
Show file tree
Hide file tree
Showing 70 changed files with 28,721 additions and 0 deletions.
18 changes: 18 additions & 0 deletions source/Clients/Clients.sln
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console Client Credentials
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF Client (Hybrid with PKCE)", "WpfOidcClient\WPF Client (Hybrid with PKCE).csproj", "{86CAEDFB-800A-441B-BBA1-C930FD23EE49}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebForms OWIN Implicit", "WebFormsClient\WebForms OWIN Implicit.csproj", "{43757AF6-7762-44AC-A8B7-842C119BE3CB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -299,6 +301,22 @@ Global
{86CAEDFB-800A-441B-BBA1-C930FD23EE49}.Release|x64.Build.0 = Release|Any CPU
{86CAEDFB-800A-441B-BBA1-C930FD23EE49}.Release|x86.ActiveCfg = Release|Any CPU
{86CAEDFB-800A-441B-BBA1-C930FD23EE49}.Release|x86.Build.0 = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|ARM.ActiveCfg = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|ARM.Build.0 = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|x64.ActiveCfg = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|x64.Build.0 = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|x86.ActiveCfg = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Debug|x86.Build.0 = Debug|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|Any CPU.Build.0 = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|ARM.ActiveCfg = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|ARM.Build.0 = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|x64.ActiveCfg = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|x64.Build.0 = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|x86.ActiveCfg = Release|Any CPU
{43757AF6-7762-44AC-A8B7-842C119BE3CB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
10 changes: 10 additions & 0 deletions source/Clients/WebFormsClient/About.aspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="WebApp.About" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<h1>Secure Page, logged in as <%= User.Identity.Name %></h1>
<ul>
<% foreach (var claim in ((System.Security.Claims.ClaimsPrincipal)User).Claims){ %>
<li><%: claim.Type + ", " + claim.Value %></li>
<%} %>
</ul>
</asp:Content>
17 changes: 17 additions & 0 deletions source/Clients/WebFormsClient/About.aspx.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApp
{
public partial class About : Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
}
17 changes: 17 additions & 0 deletions source/Clients/WebFormsClient/About.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions source/Clients/WebFormsClient/App_Start/BundleConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;
using System.Web.UI;

namespace WebApp
{
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkID=303951
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
"~/Scripts/WebForms/WebForms.js",
"~/Scripts/WebForms/WebUIValidation.js",
"~/Scripts/WebForms/MenuStandards.js",
"~/Scripts/WebForms/Focus.js",
"~/Scripts/WebForms/GridView.js",
"~/Scripts/WebForms/DetailsView.js",
"~/Scripts/WebForms/TreeView.js",
"~/Scripts/WebForms/WebParts.js"));

// Order is very important for these files to work, they have explicit dependencies
bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));

// Use the Development version of Modernizr to develop with and learn from. Then, when you’re
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));

ScriptManager.ScriptResourceMapping.AddDefinition(
"respond",
new ScriptResourceDefinition
{
Path = "~/Scripts/respond.min.js",
DebugPath = "~/Scripts/respond.js",
});
}
}
}
18 changes: 18 additions & 0 deletions source/Clients/WebFormsClient/App_Start/RouteConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;

namespace WebApp
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Temporary;
routes.EnableFriendlyUrls(settings);
}
}
}
7 changes: 7 additions & 0 deletions source/Clients/WebFormsClient/Bundle.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<bundles version="1.0">
<styleBundle path="~/Content/css">
<include path="~/Content/bootstrap.css" />
<include path="~/Content/Site.css" />
</styleBundle>
</bundles>
31 changes: 31 additions & 0 deletions source/Clients/WebFormsClient/Content/Site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
padding-bottom: 20px;
}

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
max-width: 280px;
}


/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
.jumbotron {
margin-top: 20px;
}

.body-content {
padding: 0;
}
}
Loading

0 comments on commit edfa6af

Please sign in to comment.