|
|
|
@{
|
|
|
|
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 (Model!=null) {
|
|
|
|
<h3>Message received from the resource controller: @Model</h3>
|
|
|
|
}
|
|
|
|
|
|
|
|
<form action="~/Home/GetUserInfo" method="post">
|
|
|
|
<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>
|
|
|
|
</form>
|
|
|
|
<form action="~/Home/PostFiles/?subdir=test" method="post" enctype="multipart/form-data">
|
|
|
|
Envoyer vers le dossier "test" <input type="file" name="file" multiple/>
|
|
|
|
<button class="btn btn-lg btn-warning" type="submit">Post files</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>
|