36 lines
951 B
Plaintext

@using Microsoft.AspNetCore.Authentication
<div class="loginform">
@if (!this.User.Identity.IsAuthenticated)
{
<form method="post" action="Auth/Login">
<div>
<label for="username">Username:</label>
</div>
<div>
<input name="username" type="text" />
</div>
<div>
<label for="password">Password:</label>
</div>
<div>
<input name="password" type="password" />
</div>
<div>
<input name="submit" type="submit" value="Login" />
</div>
</form>
}
else
{
<form method="post" action="Auth/Logout">
<div>
Welcome, @User.Identity.Name!
</div>
<div>
<input name="submit" type="submit" value="Logout" />
</div>
</form>
}
</div>