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>
|
Reference in New Issue
Block a user