mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 02:12:50 +02:00
httputil : wrap handlers for additional context (#413)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
487fc655d6
commit
b3d3159185
27 changed files with 495 additions and 463 deletions
|
@ -10,21 +10,21 @@
|
|||
<div id="main">
|
||||
<div id="info-box">
|
||||
<div class="card">
|
||||
{{if .Session.Picture }}
|
||||
<img class="icon" src="{{.Session.Picture}}" alt="user image" />
|
||||
{{else}}
|
||||
<img
|
||||
class="icon"
|
||||
src="/.pomerium/assets/img/account_circle-24px.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
/>
|
||||
{{end}}
|
||||
<div class="card-header">
|
||||
<h2>Current user</h2>
|
||||
{{if .Session.Picture }}
|
||||
<img class="icon" src="{{.Session.Picture}}" alt="user image" />
|
||||
{{else}}
|
||||
<img
|
||||
class="icon"
|
||||
src="/.pomerium/assets/img/account_circle-24px.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
/>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<form method="POST" action="/.pomerium/sign_out">
|
||||
<section>
|
||||
<h2>Current user</h2>
|
||||
<p class="message">Your current session details.</p>
|
||||
<fieldset>
|
||||
{{if .Session.Name}}
|
||||
|
@ -189,11 +189,23 @@
|
|||
<button class="button full" type="submit">Sign Out</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{if .IsAdmin}}
|
||||
|
||||
<div id="info-box">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Sign-in-as</h2>
|
||||
<img
|
||||
class="icon"
|
||||
src="/.pomerium/assets/img/supervised_user_circle-24px.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{{if .IsAdmin}}
|
||||
<form method="POST" action="/.pomerium/impersonate">
|
||||
<section>
|
||||
<h2>Sign-in-as</h2>
|
||||
<p class="message">
|
||||
Administrators can temporarily impersonate another user.
|
||||
</p>
|
||||
|
@ -235,7 +247,6 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer.html"}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,34 +2,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" charset="utf-8">
|
||||
<head>
|
||||
<title>{{.Code}} - {{.Title}}</title>
|
||||
<title>{{.Status}} - {{.StatusText}}</title>
|
||||
{{template "header.html"}}
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<div id="info-box">
|
||||
<div class="card">
|
||||
<img
|
||||
class="icon"
|
||||
src="/.pomerium/assets/img/error-24px.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
/>
|
||||
<h1 class="title">{{.Title}}</h1>
|
||||
<div class="card-header">
|
||||
<img
|
||||
class="icon"
|
||||
src="/.pomerium/assets/img/error-24px.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
/>
|
||||
<h2>{{.StatusText}}</h2>
|
||||
<h2>{{.Status}}</h2>
|
||||
</div>
|
||||
<section>
|
||||
<p class="message">
|
||||
{{if .Message}}{{.Message}}{{end}} {{if .CanDebug}}Troubleshoot
|
||||
your
|
||||
<a href="/.pomerium/">session</a>.{{end}} {{if .RequestID}}
|
||||
Request {{.RequestID}}{{end}}
|
||||
</p>
|
||||
<div class="message">
|
||||
<div class="text-monospace">{{.Error}}</div>
|
||||
</div>
|
||||
{{if .CanDebug}}
|
||||
<div class="message">
|
||||
If you should have access, contact your administrator and provide
|
||||
them with your
|
||||
<a href="/.pomerium/">request details</a>.
|
||||
</div>
|
||||
|
||||
{{end}} {{if.RetryURL}}
|
||||
<div class="message">
|
||||
If you believe the error is temporary, you can
|
||||
<a href="{{.RetryURL}}">retry</a> the request.
|
||||
</div>
|
||||
{{end}}
|
||||
</section>
|
||||
<div class="card-footer">
|
||||
<a href="https://www.pomerium.io">
|
||||
<img
|
||||
src="/.pomerium/assets/img/pomerium_circle_96.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<div class="text-right text-muted small">
|
||||
{{.RequestID}} <br />
|
||||
Pomerium {{.Version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer.html"}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{{end}}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
{{define "footer.html"}}
|
||||
<footer>
|
||||
<a href="https://www.pomerium.io">
|
||||
<img
|
||||
class="powered-by-pomerium"
|
||||
src="/.pomerium/assets/img/pomerium.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="25"
|
||||
/>
|
||||
</a>
|
||||
</footer>
|
||||
{{end}}
|
|
@ -8,5 +8,4 @@
|
|||
type="text/css"
|
||||
href="/.pomerium/assets/style/main.css"
|
||||
/>
|
||||
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue