oidc reloaded
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
<div class="jumbotron">
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<hr/>
|
||||
|
||||
<h2 class="lead text-left">@SR["Use a local account to log in"]</h2>
|
||||
<form action="/login" method="post" class="form-horizontal" role="form">
|
||||
|
||||
@ -46,8 +47,8 @@
|
||||
<p>
|
||||
<a asp-action="ForgotPassword" asp-controller="Account">@SR["Forgot your password"]?</a>
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="ReturnUrl" value="@Model.AfterLoginRedirectUrl" />
|
||||
<input type="hidden" name="Provider" value="LOCAL" />
|
||||
<input type="hidden" name="ReturnUrl" value="@Model.ReturnUrl" />
|
||||
|
||||
@Html.AntiForgeryToken()
|
||||
</form>
|
||||
@ -68,7 +69,7 @@
|
||||
@foreach (var description in Model.ExternalProviders) {
|
||||
<form action="/signin" method="post">
|
||||
<input type="hidden" name="Provider" value="@description.AuthenticationScheme" />
|
||||
<input type="hidden" name="AfterLoginRedirectUrl" value="@Model.AfterLoginRedirectUrl" />
|
||||
<input type="hidden" name="ReturnUrl" value="@Url.Action("ExternalLoginCallback","Account", new { returnUrl = Model.ReturnUrl })" />
|
||||
<button class="btn btn-lg btn-success" type="submit">@SR["Connect using"] @description.DisplayName</button>
|
||||
@Html.AntiForgeryToken()
|
||||
</form>
|
||||
|
@ -13,6 +13,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
|
||||
<form enctype="application/x-www-form-urlencoded" method="post" class="navbar-right">
|
||||
@Html.AntiForgeryToken()
|
||||
<label for="username">username:</label><input name="username" placeholder="(Votre Nom d'utilisateur)"/>
|
||||
<label for="password">password:</label><input name="password" placeholder="(Votre mot de passe)" type="password"/>
|
||||
<input formaction="/api/token/post" class="btn btn-lg btn-success" name="Getatoken" type="submit" value="Getatoken" />
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
16
Yavsc/Views/Shared/getatoken.cshtml
Normal file
16
Yavsc/Views/Shared/getatoken.cshtml
Normal file
@ -0,0 +1,16 @@
|
||||
@using AspNet.Security.OpenIdConnect.Extensions
|
||||
@using Microsoft.IdentityModel.Protocols.OpenIdConnect
|
||||
|
||||
|
||||
@model AuthorisationView
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>Authorization</h1>
|
||||
|
||||
<p class="lead text-left">Get a token</p>
|
||||
|
||||
<form enctype="application/x-www-form-urlencoded" method="post">
|
||||
@Html.AntiForgeryToken()
|
||||
<input formaction="/api/token/get" class="btn btn-lg btn-success" name="Getatoken" type="submit" value="Getatoken" />
|
||||
</form>
|
||||
</div>
|
Reference in New Issue
Block a user