oidc
This commit is contained in:
7
testOauthClient/Views/Home/About.cshtml
Executable file
7
testOauthClient/Views/Home/About.cshtml
Executable file
@ -0,0 +1,7 @@
|
||||
@{
|
||||
ViewData["Title"] = "About";
|
||||
}
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>@ViewData["Message"]</h3>
|
||||
|
||||
<p>Use this area to provide additional information.</p>
|
17
testOauthClient/Views/Home/Contact.cshtml
Executable file
17
testOauthClient/Views/Home/Contact.cshtml
Executable file
@ -0,0 +1,17 @@
|
||||
@{
|
||||
ViewData["Title"] = "Contact";
|
||||
}
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>@ViewData["Message"]</h3>
|
||||
|
||||
<address>
|
||||
One Microsoft Way<br />
|
||||
Redmond, WA 98052-6399<br />
|
||||
<abbr title="Phone">P:</abbr>
|
||||
425.555.0100
|
||||
</address>
|
||||
|
||||
<address>
|
||||
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
|
||||
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
|
||||
</address>
|
30
testOauthClient/Views/Home/Index.cshtml
Executable file
30
testOauthClient/Views/Home/Index.cshtml
Executable file
@ -0,0 +1,30 @@
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
<div class="jumbotron">
|
||||
@if (User?.Identity?.IsAuthenticated ?? false) {
|
||||
<h1>Welcome, @User.Identity.Name</h1>
|
||||
|
||||
<p>
|
||||
@foreach (var claim in Context.User.Claims) {
|
||||
<div>@claim.Type: <b>@claim.Value</b></div>
|
||||
}
|
||||
</p>
|
||||
|
||||
if (!string.IsNullOrEmpty(Model)) {
|
||||
<h3>Message received from the resource controller: @Model</h3>
|
||||
}
|
||||
|
||||
<form action="~/" method="post">
|
||||
<button class="btn btn-lg btn-warning" type="submit">Query the resource controller</button>
|
||||
</form>
|
||||
|
||||
<a class="btn btn-lg btn-danger" href="/signout">Sign out</a>
|
||||
}
|
||||
|
||||
else {
|
||||
<h1>Welcome, anonymous</h1>
|
||||
<a class="btn btn-lg btn-success" href="/signin">Sign in</a>
|
||||
}
|
||||
</div>
|
6
testOauthClient/Views/Shared/Error.cshtml
Executable file
6
testOauthClient/Views/Shared/Error.cshtml
Executable file
@ -0,0 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
67
testOauthClient/Views/Shared/_Layout.cshtml
Executable file
67
testOauthClient/Views/Shared/_Layout.cshtml
Executable file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - testOauthClient</title>
|
||||
|
||||
<environment names="Development">
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
</environment>
|
||||
<environment names="Staging,Production">
|
||||
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/css/bootstrap.min.css"
|
||||
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
|
||||
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
|
||||
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
|
||||
</environment>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a asp-controller="Home" asp-action="Index" class="navbar-brand">testOauthClient</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a asp-controller="Home" asp-action="Index">Home</a></li>
|
||||
<li><a asp-controller="Home" asp-action="About">About</a></li>
|
||||
<li><a asp-controller="Home" asp-action="Contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2016 - testOauthClient</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<environment names="Development">
|
||||
<script src="~/lib/jquery/dist/jquery.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
<environment names="Staging,Production">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"
|
||||
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
|
||||
asp-fallback-test="window.jQuery">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/bootstrap.min.js"
|
||||
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
|
||||
</script>
|
||||
<script src="~/js/site.min.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
2
testOauthClient/Views/_ViewImports.cshtml
Executable file
2
testOauthClient/Views/_ViewImports.cshtml
Executable file
@ -0,0 +1,2 @@
|
||||
@using testOauthClient
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
3
testOauthClient/Views/_ViewStart.cshtml
Executable file
3
testOauthClient/Views/_ViewStart.cshtml
Executable file
@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
Reference in New Issue
Block a user