mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 01:58: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>
|
82
OpenAuth.Identity/Views/Consent/Index.cshtml
Normal file
82
OpenAuth.Identity/Views/Consent/Index.cshtml
Normal file
@@ -0,0 +1,82 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Consent.ConsentViewModel
|
||||
|
||||
<div class="page-consent">
|
||||
<div class="row page-header">
|
||||
<div class="col-sm-10">
|
||||
@if (Model.ClientLogoUrl != null)
|
||||
{
|
||||
<div class="client-logo"><img src="@Model.ClientLogoUrl"></div>
|
||||
}
|
||||
<h1>
|
||||
@Model.ClientName
|
||||
<small>is requesting your permission</small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<partial name="_ValidationSummary" />
|
||||
|
||||
<form asp-action="Index" class="consent-form">
|
||||
<input type="hidden" asp-for="ReturnUrl" />
|
||||
|
||||
<div>Uncheck the permissions you do not wish to grant.</div>
|
||||
|
||||
@if (Model.IdentityScopes.Any())
|
||||
{
|
||||
<div class="panel panel-default consent-buttons">
|
||||
<div class="panel-heading">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
Personal Information
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
@foreach (var scope in Model.IdentityScopes)
|
||||
{
|
||||
<partial name="_ScopeListItem" model="@scope" />
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.ResourceScopes.Any())
|
||||
{
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="glyphicon glyphicon-tasks"></span>
|
||||
Application Access
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
@foreach (var scope in Model.ResourceScopes)
|
||||
{
|
||||
<partial name="_ScopeListItem" model="scope" />
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.AllowRememberConsent)
|
||||
{
|
||||
<div class="consent-remember">
|
||||
<label>
|
||||
<input class="consent-scopecheck" asp-for="RememberConsent" />
|
||||
<strong>Remember My Decision</strong>
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="consent-buttons">
|
||||
<button name="button" value="yes" class="btn btn-primary" autofocus>Yes, Allow</button>
|
||||
<button name="button" value="no" class="btn">No, Do Not Allow</button>
|
||||
@if (Model.ClientUrl != null)
|
||||
{
|
||||
<a class="pull-right btn btn-default" target="_blank" href="@Model.ClientUrl">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
<strong>@Model.ClientName</strong>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
6
OpenAuth.Identity/Views/Device/Success.cshtml
Normal file
6
OpenAuth.Identity/Views/Device/Success.cshtml
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
Success
|
||||
<small>You have successfully authorized the device</small>
|
||||
</h1>
|
||||
</div>
|
14
OpenAuth.Identity/Views/Device/UserCodeCapture.cshtml
Normal file
14
OpenAuth.Identity/Views/Device/UserCodeCapture.cshtml
Normal file
@@ -0,0 +1,14 @@
|
||||
@model string
|
||||
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
User Code
|
||||
</h1>
|
||||
<p>
|
||||
Please enter the code displayed on your device
|
||||
</p>
|
||||
<form asp-action="UserCodeCapture" method="post">
|
||||
<input for="userCode" name="userCode" />
|
||||
<button class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
</div>
|
93
OpenAuth.Identity/Views/Device/UserCodeConfirmation.cshtml
Normal file
93
OpenAuth.Identity/Views/Device/UserCodeConfirmation.cshtml
Normal file
@@ -0,0 +1,93 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Device.DeviceAuthorizationViewModel
|
||||
|
||||
<div class="page-header">
|
||||
<div class="row page-header">
|
||||
<div class="col-sm-10">
|
||||
@if (Model.ClientLogoUrl != null)
|
||||
{
|
||||
<div class="client-logo"><img src="@Model.ClientLogoUrl"></div>
|
||||
}
|
||||
<h1>
|
||||
@Model.ClientName
|
||||
<small>is requesting your permission</small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.ConfirmUserCode)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<p>
|
||||
Please confirm that the authorization request quotes the code: "@Model.UserCode".
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<partial name="_ValidationSummary" />
|
||||
|
||||
<form asp-action="Callback" class="consent-form">
|
||||
<input asp-for="UserCode" type="hidden" value="@Model.UserCode" />
|
||||
|
||||
<div>Uncheck the permissions you do not wish to grant.</div>
|
||||
|
||||
@if (Model.IdentityScopes.Any())
|
||||
{
|
||||
<div class="panel panel-default consent-buttons">
|
||||
<div class="panel-heading">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
Personal Information
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
@foreach (var scope in Model.IdentityScopes)
|
||||
{
|
||||
<partial name="_ScopeListItem" model="@scope" />
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.ResourceScopes.Any())
|
||||
{
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<span class="glyphicon glyphicon-tasks"></span>
|
||||
Application Access
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
@foreach (var scope in Model.ResourceScopes)
|
||||
{
|
||||
<partial name="_ScopeListItem" model="scope" />
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.AllowRememberConsent)
|
||||
{
|
||||
<div class="consent-remember">
|
||||
<label>
|
||||
<input class="consent-scopecheck" asp-for="RememberConsent" />
|
||||
<strong>Remember My Decision</strong>
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="consent-buttons">
|
||||
<button name="button" value="yes" class="btn btn-primary" autofocus>Yes, Allow</button>
|
||||
<button name="button" value="no" class="btn">No, Do Not Allow</button>
|
||||
@if (Model.ClientUrl != null)
|
||||
{
|
||||
<a class="pull-right btn btn-default" target="_blank" href="@Model.ClientUrl">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
<strong>@Model.ClientName</strong>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
32
OpenAuth.Identity/Views/Diagnostics/Index.cshtml
Normal file
32
OpenAuth.Identity/Views/Diagnostics/Index.cshtml
Normal file
@@ -0,0 +1,32 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Diagnostics.DiagnosticsViewModel
|
||||
|
||||
<h1>Authentication cookie</h1>
|
||||
|
||||
<h3>Claims</h3>
|
||||
<dl>
|
||||
@foreach (var claim in Model.AuthenticateResult.Principal.Claims)
|
||||
{
|
||||
<dt>@claim.Type</dt>
|
||||
<dd>@claim.Value</dd>
|
||||
}
|
||||
</dl>
|
||||
|
||||
<h3>Properties</h3>
|
||||
<dl>
|
||||
@foreach (var prop in Model.AuthenticateResult.Properties.Items)
|
||||
{
|
||||
<dt>@prop.Key</dt>
|
||||
<dd>@prop.Value</dd>
|
||||
}
|
||||
</dl>
|
||||
|
||||
@if (Model.Clients.Any())
|
||||
{
|
||||
<h3>Clients</h3>
|
||||
<ul>
|
||||
@foreach (var client in Model.Clients)
|
||||
{
|
||||
<li>@client</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
79
OpenAuth.Identity/Views/Grants/Index.cshtml
Normal file
79
OpenAuth.Identity/Views/Grants/Index.cshtml
Normal file
@@ -0,0 +1,79 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Grants.GrantsViewModel
|
||||
|
||||
<div class="grants">
|
||||
<div class="row page-header">
|
||||
<div class="col-sm-10">
|
||||
<h1>
|
||||
Client Application Access
|
||||
</h1>
|
||||
<div>Below is the list of applications you have given access to and the names of the resources they have access to.</div>
|
||||
</div>
|
||||
</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="row grant">
|
||||
<div class="col-sm-2">
|
||||
@if (grant.ClientLogoUrl != null)
|
||||
{
|
||||
<img src="@grant.ClientLogoUrl">
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="clientname">@grant.ClientName</div>
|
||||
<div>
|
||||
<span class="created">Created:</span> @grant.Created.ToString("yyyy-MM-dd")
|
||||
</div>
|
||||
@if (grant.Expires.HasValue)
|
||||
{
|
||||
<div>
|
||||
<span class="expires">Expires:</span> @grant.Expires.Value.ToString("yyyy-MM-dd")
|
||||
</div>
|
||||
}
|
||||
@if (grant.IdentityGrantNames.Any())
|
||||
{
|
||||
<div>
|
||||
<div class="granttype">Identity Grants</div>
|
||||
<ul>
|
||||
@foreach (var name in grant.IdentityGrantNames)
|
||||
{
|
||||
<li>@name</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
@if (grant.ApiGrantNames.Any())
|
||||
{
|
||||
<div>
|
||||
<div class="granttype">API Grants</div>
|
||||
<ul>
|
||||
@foreach (var name in grant.ApiGrantNames)
|
||||
{
|
||||
<li>@name</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
</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>
|
39
OpenAuth.Identity/Views/Home/Index.cshtml
Normal file
39
OpenAuth.Identity/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,39 @@
|
||||
@{
|
||||
var version = typeof(IdentityServer4.Hosting.IdentityServerMiddleware).Assembly.GetName().Version.ToString();
|
||||
}
|
||||
|
||||
<div class="welcome-page">
|
||||
<div class="row page-header">
|
||||
<div class="col-sm-10">
|
||||
<h1>
|
||||
<img class="icon" src="~/icon.jpg">
|
||||
Welcome to IdentityServer4
|
||||
<small>(version @version)</small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p>
|
||||
Click <a href="~/grants">here</a> to manage your stored grants.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<p>
|
||||
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/master/samples">ready to use samples</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
40
OpenAuth.Identity/Views/Shared/Error.cshtml
Normal file
40
OpenAuth.Identity/Views/Shared/Error.cshtml
Normal file
@@ -0,0 +1,40 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Home.ErrorViewModel
|
||||
|
||||
@{
|
||||
var error = Model?.Error?.Error;
|
||||
var errorDescription = Model?.Error?.ErrorDescription;
|
||||
var request_id = Model?.Error?.RequestId;
|
||||
}
|
||||
|
||||
<div class="error-page">
|
||||
<div class="page-header">
|
||||
<h1>Error</h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="alert alert-danger">
|
||||
Sorry, there was an error
|
||||
|
||||
@if (error != null)
|
||||
{
|
||||
<strong>
|
||||
<em>
|
||||
: @error
|
||||
</em>
|
||||
</strong>
|
||||
|
||||
if (errorDescription != null)
|
||||
{
|
||||
<div>@errorDescription</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (request_id != null)
|
||||
{
|
||||
<div class="request-id">Request Id: @request_id</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
7
OpenAuth.Identity/Views/Shared/Redirect.cshtml
Normal file
7
OpenAuth.Identity/Views/Shared/Redirect.cshtml
Normal file
@@ -0,0 +1,7 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Account.RedirectViewModel
|
||||
|
||||
<h1>You are now being returned to the application.</h1>
|
||||
<p>Once complete, you may close this tab</p>
|
||||
|
||||
<meta http-equiv="refresh" content="0;url=@Model.RedirectUrl" data-url="@Model.RedirectUrl">
|
||||
<script src="~/js/signin-redirect.js"></script>
|
72
OpenAuth.Identity/Views/Shared/_Layout.cshtml
Normal file
72
OpenAuth.Identity/Views/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,72 @@
|
||||
@using IdentityServer4.Extensions
|
||||
@{
|
||||
string name = null;
|
||||
if (!true.Equals(ViewData["signed-out"]))
|
||||
{
|
||||
name = Context.User?.GetDisplayName();
|
||||
}
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OpenAuth.Net认证中心- 最好用的.net权限工作流框架|.net core快速开发框架|.net core权限管理|.net core工作流</title>
|
||||
<meta name="Keywords" content="openauth.net,.net开源工作流,.NET开源权限管理">
|
||||
<meta name="Description" content="最好用的.net开源工作流框架,最好用的.NET开源权限管理框架">
|
||||
<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="~/css/site.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="~/">
|
||||
<span class="navbar-brand">
|
||||
<img src="~/icon.png" class="icon-banner">
|
||||
OpenAuth.Net IdentityServer认证中心
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">@name <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a asp-action="Logout" asp-controller="Account">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
</div>
|
||||
|
||||
<script src="~/lib/jquery/jquery.js"></script>
|
||||
<script src="~/lib/bootstrap/js/bootstrap.js"></script>
|
||||
<script type="text/javascript">
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?0558502420ce5fee054b31425e77ffa6";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
34
OpenAuth.Identity/Views/Shared/_ScopeListItem.cshtml
Normal file
34
OpenAuth.Identity/Views/Shared/_ScopeListItem.cshtml
Normal file
@@ -0,0 +1,34 @@
|
||||
@model OpenAuth.IdentityServer.Quickstart.Consent.ScopeViewModel
|
||||
|
||||
<li class="list-group-item">
|
||||
<label>
|
||||
<input class="consent-scopecheck"
|
||||
type="checkbox"
|
||||
name="ScopesConsented"
|
||||
id="scopes_@Model.Name"
|
||||
value="@Model.Name"
|
||||
checked="@Model.Checked"
|
||||
disabled="@Model.Required" />
|
||||
@if (Model.Required)
|
||||
{
|
||||
<input type="hidden"
|
||||
name="ScopesConsented"
|
||||
value="@Model.Name" />
|
||||
}
|
||||
<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.Name">@Model.Description</label>
|
||||
</div>
|
||||
}
|
||||
</li>
|
7
OpenAuth.Identity/Views/Shared/_ValidationSummary.cshtml
Normal file
7
OpenAuth.Identity/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>
|
||||
}
|
1
OpenAuth.Identity/Views/_ViewImports.cshtml
Normal file
1
OpenAuth.Identity/Views/_ViewImports.cshtml
Normal file
@@ -0,0 +1 @@
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
3
OpenAuth.Identity/Views/_ViewStart.cshtml
Normal file
3
OpenAuth.Identity/Views/_ViewStart.cshtml
Normal file
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
Reference in New Issue
Block a user