Local Passwords validation
This commit is contained in:
@ -1,18 +1,7 @@
|
||||
@{
|
||||
ViewData["Title"] = "Forbidden";
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
L'accès à cette ressource est protégé.
|
||||
|
||||
@if (ViewBag.UserIsSignedIn) {
|
||||
|
||||
@:Vous ne possédez pas les droits suffisants pour y acceder.
|
||||
|
||||
<a class="btn btn-lg btn-success" asp-controller="Account" asp-action="SignIn" asp-route-returnurl="@Model" >Login avec un autre compte</a>
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
<a class="btn btn-lg btn-success" class="success" asp-controller="Account" asp-action="SignIn" asp-route-returnurl="@Model" >Login</a>
|
||||
}
|
||||
|
||||
<div class="container">
|
||||
<div class="lead">
|
||||
<h1>Access Denied</h1>
|
||||
<p>You do not have access to that resource.</p>
|
||||
</div>
|
||||
</div>
|
@ -1,10 +0,0 @@
|
||||
@{
|
||||
ViewData["Title"] = "Account creation success";
|
||||
|
||||
}
|
||||
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
Your account has successfully been created.
|
||||
|
||||
<a asp-action="Index" asp-controller="Home">Return to home</a>
|
@ -1,11 +0,0 @@
|
||||
@{
|
||||
ViewData["Title"] = "Succès de la création du compte";
|
||||
|
||||
}
|
||||
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
Votre compte a été créé.
|
||||
Vous devrez confirmer votre addresse e-mail.
|
||||
|
||||
<a asp-action="Index" asp-controller="Home">Retourner à l'accueil</a>
|
@ -1,14 +0,0 @@
|
||||
@model UnregisterViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Unregister";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="AdminDelete" method="post" class="form-horizontal" role="form">
|
||||
|
||||
@Html.Hidden("UserId")
|
||||
@Html.Hidden("ReturnUrl")
|
||||
<input type="submit" value="Unregister"]" class="btn btn-default"/>
|
||||
</form>
|
||||
|
@ -1,12 +0,0 @@
|
||||
@model Yavsc.Abstract.Manage.EmailSentViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "S'il vous plait, veuillez confirmer votre adresse e-mail";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<div>
|
||||
<p>
|
||||
Un message vient d' être envoyé à l'adresse e-mail ( @Model.EMail , id:@Model.MessageId ).
|
||||
</p>
|
||||
</div>
|
@ -1,14 +0,0 @@
|
||||
@model UnregisterViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Unregister";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="Delete" method="post" class="form-horizontal" role="form">
|
||||
|
||||
@Html.Hidden("ReturnUrl")
|
||||
@Html.Hidden("UserId")
|
||||
<input type="submit" value="Unregister"]" class="btn btn-default"/>
|
||||
</form>
|
||||
|
@ -1,15 +0,0 @@
|
||||
@{
|
||||
ViewData["Title"] = "Confirmation de votre adresse e-mail";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<div>
|
||||
<p>
|
||||
Merci d’avoir confirmé votre e-mail.
|
||||
@if (User.GetUserId()==null) {
|
||||
<text>S’il vous plait,
|
||||
<a asp-controller="Account" asp-action="SignIn">Cliquez ici pour vous connecter</a>.
|
||||
</text>
|
||||
}
|
||||
</p>
|
||||
</div>
|
@ -1,42 +0,0 @@
|
||||
@model ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>Assoiciez votre compte @ViewData["LoginProvider"].</h3>
|
||||
|
||||
<form asp-controller="Account" asp-action="ExternalLoginConfirmation" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>Formulaire d'Association</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
|
||||
<p class="text-info">
|
||||
You've successfully authenticated with <strong>@ViewData["LoginProvider"]</strong>.
|
||||
Please enter a user name for this site below and click the Register button to finish
|
||||
logging in.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
@model ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>Associez votre compte @ViewData["LoginProvider"].</h3>
|
||||
|
||||
<form asp-controller="Account" asp-action="ExternalLoginConfirmation" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>Formulaire d'Association</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
|
||||
<p class="text-info">
|
||||
Vous vous êtes authentifié avec succès auprès de <strong>@ViewData["LoginProvider"]</strong>.
|
||||
Veuillez s'il vous plait, saisir un nom d'utilisateur ci-dessous
|
||||
et activer le boutton "Enregister" pour terminer votre inscription.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Enregister</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
@{
|
||||
ViewData["Title"] = "Login Failure";
|
||||
}
|
||||
|
||||
<hgroup>
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3 class="text-danger">Unsuccessful login with service.</h3>
|
||||
</hgroup>
|
33
src/Yavsc/Views/Account/ForgotPassword.cshtml
Executable file → Normal file
33
src/Yavsc/Views/Account/ForgotPassword.cshtml
Executable file → Normal file
@ -1,34 +1,9 @@
|
||||
@model ForgotPasswordViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Forgot your password?";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="ForgotPassword" method="post" class="form-horizontal" role="form">
|
||||
<h4>Enter your user name or e-mail.</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<form asp-controller="Account" asp-action="ForgotPassword">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">LoginOrEmail</label>
|
||||
<div class="col-md-10">
|
||||
@if (User.Identity.IsAuthenticated) {
|
||||
<input type="hidden" name="LoginOrEmail" value="@ViewBag.UserEmail" />
|
||||
@ViewBag.UserEmail
|
||||
|
||||
} else {
|
||||
<input asp-for="LoginOrEmail" class="form-control" />
|
||||
}
|
||||
<span asp-validation-for="LoginOrEmail" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</div>
|
||||
<label asp-for="LoginOrEmail"></label>
|
||||
<input class="form-control" placeholder="LoginOrEmail" asp-for="LoginOrEmail" autofocus>
|
||||
</div>
|
||||
<button class="btn btn-primary" name="button" value="send">Send me a recovery link</button>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
|
11
src/Yavsc/Views/Account/ForgotPasswordConfirmation.cshtml
Executable file → Normal file
11
src/Yavsc/Views/Account/ForgotPasswordConfirmation.cshtml
Executable file → Normal file
@ -1,8 +1,5 @@
|
||||
@{
|
||||
ViewData["Title"] = "Forgot Password Confirmation";
|
||||
}
|
||||
@model string
|
||||
|
||||
|
||||
<h1>Check your mail box!</h1>
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<p>
|
||||
PleaseCheckYourEmail
|
||||
</p>
|
||||
|
@ -1,6 +0,0 @@
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<a asp-action="UserList" >UserList</a>
|
@ -1,8 +0,0 @@
|
||||
@{
|
||||
ViewData["Title"] = "Locked out";
|
||||
}
|
||||
|
||||
<hgroup>
|
||||
<h1 class="text-danger">Locked out.</h1>
|
||||
<h2 class="text-danger">This account has been locked out, please try again later.</h2>
|
||||
</hgroup>
|
34
src/Yavsc/Views/Account/LoggedOut.cshtml
Normal file
34
src/Yavsc/Views/Account/LoggedOut.cshtml
Normal file
@ -0,0 +1,34 @@
|
||||
@model LoggedOutViewModel
|
||||
|
||||
@{
|
||||
// set this so the layout rendering sees an anonymous user
|
||||
ViewData["signed-out"] = true;
|
||||
}
|
||||
|
||||
<div class="logged-out-page">
|
||||
<h1>
|
||||
Logout
|
||||
<small>You are now logged out</small>
|
||||
</h1>
|
||||
|
||||
@if (Model.PostLogoutRedirectUri != null)
|
||||
{
|
||||
<div>
|
||||
Click <a class="PostLogoutRedirectUri" href="@Model.PostLogoutRedirectUri">here</a> to return to the
|
||||
<span>@Model.ClientName</span> application.
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.SignOutIframeUrl != null)
|
||||
{
|
||||
<iframe width="0" height="0" class="signout" src="@Model.SignOutIframeUrl"></iframe>
|
||||
}
|
||||
</div>
|
||||
|
||||
@section scripts
|
||||
{
|
||||
@if (Model.AutomaticRedirectAfterSignOut)
|
||||
{
|
||||
<script src="~/js/signout-redirect.js"></script>
|
||||
}
|
||||
}
|
147
src/Yavsc/Views/Account/Login.cshtml
Executable file → Normal file
147
src/Yavsc/Views/Account/Login.cshtml
Executable file → Normal file
@ -1,64 +1,87 @@
|
||||
@model LoginViewModel
|
||||
|
||||
@model Yavsc.ViewModels.Account.LoginViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Log in";
|
||||
}
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<hr/>
|
||||
|
||||
<h2 class="lead text-left">Use a local account to log in</h2>
|
||||
<form action="@Constants.LoginPath" method="post" class="form-horizontal" role="form">
|
||||
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label for="UserName" class="col-md-2 control-label">UserName</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" />
|
||||
<span asp-validation-for="UserName" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Password" class="col-md-2 control-label">Password</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="RememberMe" />
|
||||
<label for="RememberMe" class="control-label">Remember me</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-lg btn-success">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Register" asp-controller="Account">Register as a new user?</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-action="ForgotPassword" asp-controller="Account">Forgot your password?</a>
|
||||
</p>
|
||||
<input type="hidden" name="Provider" value="LOCAL" />
|
||||
<input type="hidden" name="ReturnUrl" value="@Model.ReturnUrl" />
|
||||
|
||||
@Html.AntiForgeryToken()
|
||||
</form>
|
||||
|
||||
<hr/>
|
||||
<h2 class="lead text-left">Use another service to log in:</h2>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkID=532715">this article</a>
|
||||
for details on setting up this ASP.NET application to support logging in via external services.
|
||||
</p>
|
||||
<div class="login-page">
|
||||
<div class="lead">
|
||||
<h1>Login</h1>
|
||||
<p>Choose how to login</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<partial name="_ValidationSummary" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
@if (Model.EnableLocalLogin)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Local Account</h2>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form asp-route="Login">
|
||||
<input type="hidden" asp-for="ReturnUrl" />
|
||||
|
||||
<div class="form-group">
|
||||
<label asp-for="Username"></label>
|
||||
<input class="form-control" placeholder="Username" asp-for="Username" autofocus>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Password"></label>
|
||||
<input type="password" class="form-control" placeholder="Password" asp-for="Password" autocomplete="off">
|
||||
</div>
|
||||
@if (Model.AllowRememberLogin)
|
||||
{
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" asp-for="RememberLogin">
|
||||
<label class="form-check-label" asp-for="RememberLogin">
|
||||
Remember My Login
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<button class="btn btn-primary" name="button" value="login">Login</button>
|
||||
<button class="btn btn-secondary" name="button" value="cancel">Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.VisibleExternalProviders.Any())
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>External Account</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-inline">
|
||||
@foreach (var provider in Model.VisibleExternalProviders)
|
||||
{
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-secondary"
|
||||
asp-controller="External"
|
||||
asp-action="Challenge"
|
||||
asp-route-scheme="@provider.AuthenticationScheme"
|
||||
asp-route-returnUrl="@Model.ReturnUrl">
|
||||
@provider.DisplayName
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!Model.EnableLocalLogin && !Model.VisibleExternalProviders.Any())
|
||||
{
|
||||
<div class="alert alert-warning">
|
||||
<strong>Invalid login request</strong>
|
||||
There are no login schemes configured for this request.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
15
src/Yavsc/Views/Account/Logout.cshtml
Normal file
15
src/Yavsc/Views/Account/Logout.cshtml
Normal file
@ -0,0 +1,15 @@
|
||||
@model LogoutViewModel
|
||||
|
||||
<div class="logout-page">
|
||||
<div class="lead">
|
||||
<h1>Logout</h1>
|
||||
<p>Would you like to logut of IdentityServer?</p>
|
||||
</div>
|
||||
|
||||
<form asp-action="Logout">
|
||||
<input type="hidden" name="logoutId" value="@Model.LogoutId" />
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary">Yes</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -1,54 +0,0 @@
|
||||
@model RegisterModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
@section header{
|
||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="Register" data-toggle="validator" method="post" class="form-horizontal" role="form">
|
||||
<h4>Create a new account.</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="UserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" placeholder="Your Name" />
|
||||
<span asp-validation-for="UserName" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" placeholder="Your@@email" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Password" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConfirmPassword" class="form-control" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
@model RegisterModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
@section header{
|
||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="Register" data-toggle="validator" method="post" class="form-horizontal" role="form">
|
||||
<h4>Create a new account.</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="UserName" class="col-md-2 control-label">UserName</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" placeholder="Votre nom"/>
|
||||
<span asp-validation-for="UserName" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label">Email</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" placeholder="votre@@email" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Password" class="col-md-2 control-label">Password</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword" class="col-md-2 control-label">ConfirmPassword</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConfirmPassword" class="form-control" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
49
src/Yavsc/Views/Account/ResetPassword.cshtml
Executable file → Normal file
49
src/Yavsc/Views/Account/ResetPassword.cshtml
Executable file → Normal file
@ -1,42 +1,15 @@
|
||||
@model ResetPasswordViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Reset password";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<form asp-route-id="@Model.Id" asp-route-code="@Model.Code">
|
||||
<p>@Model.Email</p>
|
||||
<div class="form-group">
|
||||
<label asp-for="Password"></label>
|
||||
<input class="form-control" placeholder="Password" asp-for="Password" autofocus>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword"></label>
|
||||
<input class="form-control" placeholder="ConfirmPassword" asp-for="ConfirmPassword" autofocus>
|
||||
</div>
|
||||
<button class="btn btn-primary" name="button" value="Reset">Reset Password</button>
|
||||
|
||||
<form asp-controller="Account" asp-action="ResetPassword" method="post" class="form-horizontal" role="form">
|
||||
<h4>Reset your password.</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Password" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConfirmPassword" class="form-control" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
@{
|
||||
ViewData["Title"] = "Reset password confirmation";
|
||||
}
|
||||
|
||||
<h1>@ViewData["Title"].</h1>
|
||||
<p>
|
||||
Your password has been reset."] Please"] <a href="~/signin">Click here to log in</a>.
|
||||
</p>
|
@ -1,21 +0,0 @@
|
||||
@model SendCodeViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Send Verification Code";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="SendCode" asp-route-returnurl="@Model.ReturnUrl" method="post" class="form-horizontal" role="form">
|
||||
<input asp-for="RememberMe" type="hidden" />
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
Select Two-Factor Authentication Provider:
|
||||
<select asp-for="SelectedProvider" asp-items="Model.Providers"></select>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
@model Yavsc.Abstract.Manage.EmailSentViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "S'il vous plait, veuillez confirmer votre adresse e-mail";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<div>
|
||||
<p>
|
||||
Un message vient de vous être envoyé, à votre adresse e-mail ( @Model.EMail , id:@Model.MessageId ),
|
||||
Veuillez s’il vous plait confirmer cette adresse de courrier en utilisant le lien hyper-texte qui s'y trouve.
|
||||
</p>
|
||||
</div>
|
@ -1,68 +0,0 @@
|
||||
@model ApplicationUser[]
|
||||
@{
|
||||
ViewData["Title"] = "Liste des utilisateurs";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<th>
|
||||
Public info"]
|
||||
</th>
|
||||
<th>
|
||||
AdminOnly"]
|
||||
</th>
|
||||
|
||||
</thead>
|
||||
@foreach (var user in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(m=>user)
|
||||
</td>
|
||||
<td>
|
||||
<dl>
|
||||
<dt>
|
||||
UserName
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(m=>user.UserName)
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
FullName
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(m=>user.FullName)
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
PostalAddress"]
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(m=>user.PostalAddress)
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>
|
||||
Email
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(m=>user.Email)
|
||||
@if (!user.EmailConfirmed) {
|
||||
<a asp-action="AdminSendConfirationEmail" asp-route-id="@user.Id" >Envoyer une demande de confirmation</a>
|
||||
}
|
||||
<a asp-action="AdminDelete" asp-route-id="@user.Id" >Supprimer</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
@if (ViewBag.hasNext)
|
||||
{
|
||||
<a asp-route-page="@ViewBag.nextpage" asp-route-len="@ViewBag.pageLen">Next page</a>
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
@model VerifyCodeViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Verify";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="VerifyCode" method="post" class="form-horizontal" role="form">
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<input asp-for="Provider" type="hidden" />
|
||||
<input asp-for="RememberMe" type="hidden" />
|
||||
@Html.Hidden("ReturnUrl")
|
||||
<h4>@ViewData["Status"]</h4>
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label asp-for="Code" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Code" class="form-control" />
|
||||
<span asp-validation-for="Code" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="RememberMe" />
|
||||
<label asp-for="RememberMe"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
<h3>Rôles</h3>
|
||||
<ul>
|
||||
@foreach (var role in Model.Roles) {
|
||||
<li>@Html.ActionLink(role.Name,"Role",new { id=role.Id }) (@role.Users.Length membres)</li>
|
||||
<li>@Html.ActionLink(role.Name,"Role",new { id=role.Id }) (@role.UserCount membres)</li>
|
||||
}
|
||||
</ul>
|
||||
<h3>Administrateurs</h3>
|
||||
|
7
src/Yavsc/Views/Device/Success.cshtml
Normal file
7
src/Yavsc/Views/Device/Success.cshtml
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
<div class="page-device-success">
|
||||
<div class="lead">
|
||||
<h1>Success</h1>
|
||||
<p>You have successfully authorized the device</p>
|
||||
</div>
|
||||
</div>
|
23
src/Yavsc/Views/Device/UserCodeCapture.cshtml
Normal file
23
src/Yavsc/Views/Device/UserCodeCapture.cshtml
Normal file
@ -0,0 +1,23 @@
|
||||
@model string
|
||||
|
||||
<div class="page-device-code">
|
||||
<div class="lead">
|
||||
<h1>User Code</h1>
|
||||
<p>Please enter the code displayed on your device.</p>
|
||||
</div>
|
||||
|
||||
<partial name="_ValidationSummary" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<form asp-action="UserCodeCapture">
|
||||
<div class="form-group">
|
||||
<label for="userCode">User Code:</label>
|
||||
<input class="form-control" for="userCode" name="userCode" autofocus />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" name="button">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
108
src/Yavsc/Views/Device/UserCodeConfirmation.cshtml
Normal file
108
src/Yavsc/Views/Device/UserCodeConfirmation.cshtml
Normal file
@ -0,0 +1,108 @@
|
||||
@model DeviceAuthorizationViewModel
|
||||
|
||||
<div class="page-device-confirmation">
|
||||
<div class="lead">
|
||||
@if (Model.ClientLogoUrl != null)
|
||||
{
|
||||
<div class="client-logo"><img src="@Model.ClientLogoUrl"></div>
|
||||
}
|
||||
<h1>
|
||||
@Model.ClientName
|
||||
<small class="text-muted">is requesting your permission</small>
|
||||
</h1>
|
||||
@if (Model.ConfirmUserCode)
|
||||
{
|
||||
<p>Please confirm that the authorization request quotes the code: <strong>@Model.UserCode</strong>.</p>
|
||||
}
|
||||
<p>Uncheck the permissions you do not wish to grant.</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<partial name="_ValidationSummary" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form asp-action="Callback">
|
||||
<input asp-for="UserCode" type="hidden" value="@Model.UserCode" />
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
@if (Model.IdentityScopes.Any())
|
||||
{
|
||||
<div class="form-group">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
Personal Information
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@foreach (var scope in Model.IdentityScopes)
|
||||
{
|
||||
<partial name="_ScopeListItem" model="@scope" />
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.ApiScopes.Any())
|
||||
{
|
||||
<div class="form-group">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="glyphicon glyphicon-tasks"></span>
|
||||
Application Access
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@foreach (var scope in Model.ApiScopes)
|
||||
{
|
||||
<partial name="_ScopeListItem" model="scope" />
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="form-group">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="glyphicon glyphicon-tasks"></span>
|
||||
Description
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<input class="form-control" placeholder="Description or name of device" asp-for="Description" autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.AllowRememberConsent)
|
||||
{
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" asp-for="RememberConsent">
|
||||
<label class="form-check-label" asp-for="RememberConsent">
|
||||
<strong>Remember My Decision</strong>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<button name="button" value="yes" class="btn btn-primary" autofocus>Yes, Allow</button>
|
||||
<button name="button" value="no" class="btn btn-secondary">No, Do Not Allow</button>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-auto">
|
||||
@if (Model.ClientUrl != null)
|
||||
{
|
||||
<a class="btn btn-outline-info" href="@Model.ClientUrl">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
<strong>@Model.ClientName</strong>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -1,46 +0,0 @@
|
||||
@model Yavsc.Models.Identity.DeviceDeclaration
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>AreYourSureYouWantToDeleteThis</h3>
|
||||
<div>
|
||||
<h4>DeviceDeclaration</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DeclarationDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DeclarationDate)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Model)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Platform)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Platform)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Version)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Version)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -1,42 +0,0 @@
|
||||
@model Yavsc.Models.Identity.DeviceDeclaration
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>DeviceDeclaration</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DeclarationDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DeclarationDate)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Model)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Platform)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Platform)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Version)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Version)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.DeviceId">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
@ -1,46 +0,0 @@
|
||||
@model IEnumerable<Yavsc.Models.Identity.DeviceDeclaration>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DeclarationDate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Platform)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Version)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DeclarationDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Platform)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Version)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@item.DeviceId">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.DeviceId">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
64
src/Yavsc/Views/Diagnostics/Index.cshtml
Normal file
64
src/Yavsc/Views/Diagnostics/Index.cshtml
Normal file
@ -0,0 +1,64 @@
|
||||
@model DiagnosticsViewModel
|
||||
|
||||
<div class="diagnostics-page">
|
||||
<div class="lead">
|
||||
<h1>Authentication Cookie</h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Claims</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl>
|
||||
@foreach (var claim in Model.AuthenticateResult.Principal.Claims)
|
||||
{
|
||||
<dt>@claim.Type</dt>
|
||||
<dd>@claim.Value</dd>
|
||||
}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Properties</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl>
|
||||
@foreach (var prop in Model.AuthenticateResult.Properties.Items)
|
||||
{
|
||||
<dt>@prop.Key</dt>
|
||||
<dd>@prop.Value</dd>
|
||||
}
|
||||
@if (Model.Clients.Any())
|
||||
{
|
||||
<dt>Clients</dt>
|
||||
<dd>
|
||||
@{
|
||||
var clients = Model.Clients.ToArray();
|
||||
for(var i = 0; i < clients.Length; i++)
|
||||
{
|
||||
<text>@clients[i]</text>
|
||||
if (i < clients.Length - 1)
|
||||
{
|
||||
<text>, </text>
|
||||
}
|
||||
}
|
||||
}
|
||||
</dd>
|
||||
}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
87
src/Yavsc/Views/Grants/Index.cshtml
Normal file
87
src/Yavsc/Views/Grants/Index.cshtml
Normal file
@ -0,0 +1,87 @@
|
||||
@model GrantsViewModel
|
||||
|
||||
<div class="grants-page">
|
||||
<div class="lead">
|
||||
<h1>Client Application Permissions</h1>
|
||||
<p>Below is the list of applications you have given permission to and the resources they have access to.</p>
|
||||
</div>
|
||||
|
||||
@if (Model.Grants.Any() == false)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="alert alert-info">
|
||||
You have not given access to any applications
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var grant in Model.Grants)
|
||||
{
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 card-title">
|
||||
@if (grant.ClientLogoUrl != null)
|
||||
{
|
||||
<img src="@grant.ClientLogoUrl">
|
||||
}
|
||||
<strong>@grant.ClientName</strong>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<form asp-action="Revoke">
|
||||
<input type="hidden" name="clientId" value="@grant.ClientId">
|
||||
<button class="btn btn-danger">Revoke Access</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="list-group list-group-flush">
|
||||
@if (grant.Description != null)
|
||||
{
|
||||
<li class="list-group-item">
|
||||
<label>Description:</label> @grant.Description
|
||||
</li>
|
||||
}
|
||||
<li class="list-group-item">
|
||||
<label>Created:</label> @grant.Created.ToString("yyyy-MM-dd")
|
||||
</li>
|
||||
@if (grant.Expires.HasValue)
|
||||
{
|
||||
<li class="list-group-item">
|
||||
<label>Expires:</label> @grant.Expires.Value.ToString("yyyy-MM-dd")
|
||||
</li>
|
||||
}
|
||||
@if (grant.IdentityGrantNames.Any())
|
||||
{
|
||||
<li class="list-group-item">
|
||||
<label>Identity Grants</label>
|
||||
<ul>
|
||||
@foreach (var name in grant.IdentityGrantNames)
|
||||
{
|
||||
<li>@name</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
@if (grant.ApiGrantNames.Any())
|
||||
{
|
||||
<li class="list-group-item">
|
||||
<label>API Grants</label>
|
||||
<ul>
|
||||
@foreach (var name in grant.ApiGrantNames)
|
||||
{
|
||||
<li>@name</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
@ -1,3 +1,4 @@
|
||||
@using System.Diagnostics
|
||||
@{
|
||||
ViewData["Title"] = SR["About"] + " " + SiteSettings.Value.Title;
|
||||
}
|
||||
@ -93,3 +94,35 @@ L'opération est annulable, jusqu'à deux semaines après sa programmation.
|
||||
<p>
|
||||
@Model
|
||||
</p>
|
||||
|
||||
@{
|
||||
var version = FileVersionInfo.GetVersionInfo(typeof(IdentityServer4.Hosting.IdentityServerMiddleware).Assembly.Location).ProductVersion.Split('+').First();
|
||||
}
|
||||
|
||||
<div class="welcome-page">
|
||||
<h1>
|
||||
<img src="~/icon.jpg">
|
||||
Welcome to IdentityServer4
|
||||
<small class="text-muted">(version @version)</small>
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
IdentityServer publishes a
|
||||
<a href="~/.well-known/openid-configuration">discovery document</a>
|
||||
where you can find metadata and links to all the endpoints, key material, etc.
|
||||
</li>
|
||||
<li>
|
||||
Click <a href="~/diagnostics">here</a> to see the claims for your current session.
|
||||
</li>
|
||||
<li>
|
||||
Click <a href="~/grants">here</a> to manage your stored grants.
|
||||
</li>
|
||||
<li>
|
||||
Here are links to the
|
||||
<a href="https://github.com/identityserver/IdentityServer4">source code repository</a>,
|
||||
and <a href="https://github.com/IdentityServer/IdentityServer4/tree/main/samples">ready to use samples</a>.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -36,3 +36,5 @@ Et ils possèdent une addresse permanente de la forme :
|
||||
|
||||
|
||||
</asciidoc>
|
||||
|
||||
|
||||
|
@ -127,3 +127,4 @@ et sans lui, la procédure en place semble cassée.
|
||||
https://forgejo.pschneider.fr/[Mon nouveau SI de tickets, je l´adopte, il fonctionne, les inscriptions sont ouvertes, et libres.]
|
||||
|
||||
</asciidoc>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
||||
<link rel="icon" type="image/x-icon" href="~/favicon.ico" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="~/favicon.ico" />
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
@await RenderSectionAsync("header", false)
|
||||
</head>
|
||||
@ -38,9 +38,11 @@
|
||||
© 2024 - Yavsc - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/jquery.slim.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/lib/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
|
||||
@await RenderSectionAsync("scripts", false)
|
||||
</body>
|
||||
</html>
|
||||
|
@ -41,21 +41,21 @@
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown04" data-bs-toggle="dropdown" aria-expanded="false">Hello @UserManager.GetUserName(User)!</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" asp-controller="Account" asp-action="Manage" title="Manage">
|
||||
<a class="dropdown-item" asp-controller="Manage" asp-action="Index" title="Manage">
|
||||
<img src="/avatars/@(User.GetUserName()).xs.png" asp-append-version="true" class="smalltofhol" />
|
||||
Manage your account
|
||||
</a>
|
||||
</li>
|
||||
<li> <a class="dropdown-item" asp-page="/Account/Logout/Index">Logout</a></li>
|
||||
<li> <a class="dropdown-item" asp-controller="Account" asp-action="Logout">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="dropdown-item">
|
||||
<a class="nav-link" asp-area="Identity" asp-page="/Account/Register">Register</a>
|
||||
<a class="nav-link" asp-controller="Account" asp-action="Register" >Register</a>
|
||||
</li>
|
||||
<li class="dropdown-item">
|
||||
<a class="nav-link" asp-area="Identity" asp-page="/Account/Login">Login</a>
|
||||
<a class="nav-link" asp-controller="Account" asp-action="Login" asp-route-ReturnUrl="~/" >Login</a>
|
||||
</li>
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
@using Duende.IdentityServer.Extensions
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark" aria-label="Yavsc">
|
||||
|
||||
<nav class="navbar navbar-dark bg-dark" aria-label="Yavsc">
|
||||
<div class="container-fluid">
|
||||
<a href="~/" class="navbar-brand"><img src="~/images/it/free-sofware.svg" class="icon-banner" alt="Lua"></a>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<li>
|
||||
<a asp-controller="Home" asp-action="About" class="nav-link">@SR["About"]</a></li>
|
||||
|
||||
@await Html.PartialAsync("_LoginPartial")
|
||||
<partial name="_LoginPartial" />
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
34
src/Yavsc/Views/Shared/_ScopeListItem.cshtml
Normal file
34
src/Yavsc/Views/Shared/_ScopeListItem.cshtml
Normal file
@ -0,0 +1,34 @@
|
||||
@model ScopeViewModel
|
||||
|
||||
<li class="list-group-item">
|
||||
<label>
|
||||
<input class="consent-scopecheck"
|
||||
type="checkbox"
|
||||
name="ScopesConsented"
|
||||
id="scopes_@Model.Value"
|
||||
value="@Model.Value"
|
||||
checked="@Model.Checked"
|
||||
disabled="@Model.Required" />
|
||||
@if (Model.Required)
|
||||
{
|
||||
<input type="hidden"
|
||||
name="ScopesConsented"
|
||||
value="@Model.Value" />
|
||||
}
|
||||
<strong>@Model.DisplayName</strong>
|
||||
@if (Model.Emphasize)
|
||||
{
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
}
|
||||
</label>
|
||||
@if (Model.Required)
|
||||
{
|
||||
<span><em>(required)</em></span>
|
||||
}
|
||||
@if (Model.Description != null)
|
||||
{
|
||||
<div class="consent-description">
|
||||
<label for="scopes_@Model.Value">@Model.Description</label>
|
||||
</div>
|
||||
}
|
||||
</li>
|
7
src/Yavsc/Views/Shared/_ValidationSummary.cshtml
Normal file
7
src/Yavsc/Views/Shared/_ValidationSummary.cshtml
Normal file
@ -0,0 +1,7 @@
|
||||
@if (ViewContext.ModelState.IsValid == false)
|
||||
{
|
||||
<div class="alert alert-danger">
|
||||
<strong>Error</strong>
|
||||
<div asp-validation-summary="All" class="danger"></div>
|
||||
</div>
|
||||
}
|
@ -29,6 +29,8 @@
|
||||
@using Yavsc.Helpers;
|
||||
|
||||
@using PayPal.PayPalAPIInterfaceService.Model;
|
||||
@using Yavsc.Models.Access;
|
||||
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Yavsc
|
||||
|
||||
@ -37,3 +39,4 @@
|
||||
@inject Microsoft.Extensions.Options.IOptions<SiteSettings> SiteSettings
|
||||
@inject SignInManager<ApplicationUser> SignInManager
|
||||
@inject UserManager<ApplicationUser> UserManager
|
||||
|
||||
|
Reference in New Issue
Block a user