oidc
This commit is contained in:
parent
9342d48c9d
commit
e85b41313f
41 changed files with 740 additions and 57 deletions
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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue