yavsc/testOauthClient/Views/Home/Index.cshtml

37 lines
1.3 KiB
Text
Raw Normal View History

2016-06-01 23:47:06 +02:00
@{
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>
2018-03-12 23:49:05 +01:00
if (Model!=null) {
2016-06-01 23:47:06 +02:00
<h3>Message received from the resource controller: @Model</h3>
}
2016-06-13 13:33:32 +02:00
<form action="~/Home/GetUserInfo" method="post">
2016-07-19 15:58:14 +02:00
<button class="btn btn-lg btn-warning" type="submit">Get user info</button>
</form>
<form action="~/Home/PostDeviceInfo" method="post">
<button class="btn btn-lg btn-warning" type="submit">Post device info</button>
2016-06-01 23:47:06 +02:00
</form>
2018-03-12 23:49:05 +01:00
<form action="~/Home/PostFiles/?subdir=test" method="post" enctype="multipart/form-data">
Envoyer vers le dossier &quot;test&quot; <input type="file" name="file" multiple/>
<button class="btn btn-lg btn-warning" type="submit">Post files</button>
</form>
2016-06-01 23:47:06 +02:00
<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>