mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-10-25 02:09:01 +08:00
转移.net core 3.1,为.NET 5做准备
This commit is contained in:
8
OpenAuth.Identity/Views/Account/AccessDenied.cshtml
Normal file
8
OpenAuth.Identity/Views/Account/AccessDenied.cshtml
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>Access Denied</h1>
|
||||
</div>
|
||||
|
||||
<p>You do not have access to that resource.</p>
|
||||
</div>
|
||||
34
OpenAuth.Identity/Views/Account/LoggedOut.cshtml
Normal file
34
OpenAuth.Identity/Views/Account/LoggedOut.cshtml
Normal file
@@ -0,0 +1,34 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Account.LoggedOutViewModel
|
||||
|
||||
@{
|
||||
// set this so the layout rendering sees an anonymous user
|
||||
ViewData["signed-out"] = true;
|
||||
}
|
||||
|
||||
<div class="page-header logged-out">
|
||||
<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>
|
||||
}
|
||||
}
|
||||
92
OpenAuth.Identity/Views/Account/Login.cshtml
Normal file
92
OpenAuth.Identity/Views/Account/Login.cshtml
Normal file
@@ -0,0 +1,92 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Account.LoginViewModel
|
||||
|
||||
<div class="login-page">
|
||||
<div class="page-header">
|
||||
<h1>Login</h1>
|
||||
</div>
|
||||
|
||||
<partial name="_ValidationSummary" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
@if (Model.EnableLocalLogin)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Local Login</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<form asp-route="Login">
|
||||
<input type="hidden" asp-for="ReturnUrl" />
|
||||
|
||||
<fieldset>
|
||||
<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 login-remember">
|
||||
<label asp-for="RememberLogin">
|
||||
<input asp-for="RememberLogin">
|
||||
<strong>Remember My Login</strong>
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" name="button" value="login">Login</button>
|
||||
<button class="btn btn-default" name="button" value="cancel">Cancel</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
*Test Accounts: System/123456 | admin/admin | test/test
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.VisibleExternalProviders.Any())
|
||||
{
|
||||
<div class="col-md-6 col-sm-6 external-providers">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">External Login</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="list-inline">
|
||||
@foreach (var provider in Model.VisibleExternalProviders)
|
||||
{
|
||||
<li>
|
||||
<a class="btn btn-default"
|
||||
asp-controller="External"
|
||||
asp-action="Challenge"
|
||||
asp-route-provider="@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 client.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
21
OpenAuth.Identity/Views/Account/Logout.cshtml
Normal file
21
OpenAuth.Identity/Views/Account/Logout.cshtml
Normal file
@@ -0,0 +1,21 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Account.LogoutViewModel
|
||||
|
||||
<div class="logout-page">
|
||||
<div class="page-header">
|
||||
<h1>Logout</h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<p>Would you like to logout of IdentityServer?</p>
|
||||
<form asp-action="Logout">
|
||||
<input type="hidden" name="logoutId" value="@Model.LogoutId" />
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary">Yes</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user