mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 09:56:31 +02:00
276 lines
8.7 KiB
HTML
276 lines
8.7 KiB
HTML
{{define "userInfo.html"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en" charset="utf-8">
|
|
|
|
<head>
|
|
<title>User info endpoint</title>
|
|
{{template "header.html"}}
|
|
</head>
|
|
|
|
<body>
|
|
<div class="inner">
|
|
<div class="header clearfix">
|
|
<div class="heading">
|
|
<a href="{{.RedirectURL}}" class="logo"></a>
|
|
<span>
|
|
<form action="{{.SignOutURL}}" method="post">
|
|
{{.csrfField}}
|
|
<input class="button" type="submit" value="Logout"/>
|
|
</form>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="content">
|
|
<div class="white box">
|
|
<div class="largestatus">
|
|
{{range .User.GetClaim "picture"}}
|
|
<img class="status-bubble" src="{{.|safeURL}}" alt="user image" />
|
|
{{else}}
|
|
<img class="status-bubble" src="{{dataURL "/.pomerium/assets/img/account_circle-24px.svg"}}" xmlns="http://www.w3.org/2000/svg" />
|
|
{{end}}
|
|
<div class="title-wrapper">
|
|
<span class="title">
|
|
{{with .User.Name}}
|
|
Hi {{.}}!
|
|
{{else}}
|
|
{{range .User.GetClaim "given_name"}}
|
|
Hi {{.}}!
|
|
{{end}}
|
|
{{end}}
|
|
</span>
|
|
<label class="status-time">
|
|
<span>
|
|
Welcome to the user info endpoint. Here you can view
|
|
your current session details, and authorization context.
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="category white box">
|
|
<div class="messages">
|
|
<div class="box-inner">
|
|
<div class="category-header clearfix">
|
|
<span class="category-title">Session Details</span>
|
|
</div>
|
|
{{if .Session}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><a href="https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims">Claims</a></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{with .Session.UserId}}
|
|
<tr>
|
|
<td>User ID</td>
|
|
<td>{{.}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{with .Session.Id}}
|
|
<tr>
|
|
<td>ID</td>
|
|
<td>{{.}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{with .Session.ExpiresAt}}
|
|
<tr>
|
|
<td>Expires At</td>
|
|
<td>{{.AsTime | formatTime}}</td>
|
|
</tr>
|
|
{{end}}
|
|
<tr>
|
|
<td>Impersonated</td>
|
|
<td>{{.IsImpersonated}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
No session details found!
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="category white box">
|
|
<div class="messages">
|
|
<div class="box-inner">
|
|
<div class="category-header clearfix">
|
|
<span class="category-title">User Claims</span>
|
|
{{with .Session.IdToken}}
|
|
<a href="https://jwt.io/#debugger-io?token={{.Raw}}">
|
|
<span class="category-icon"> </span>
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
{{if .Session}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><a href="https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims">Claims</a></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range $k,$v:=.Session.Claims}}
|
|
<tr>
|
|
<td>{{$k}}</td>
|
|
<td>
|
|
{{range $v.AsSlice}}
|
|
{{if eq $k "exp" "iat" "updated_at"}}
|
|
<p>{{formatTime .}}</p>
|
|
{{else}}
|
|
<p>{{.}}</p>
|
|
{{end}}
|
|
{{end}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
No user claims found!
|
|
{{end}}
|
|
</div>
|
|
<div class="category-link">
|
|
User <a href="https://docs.pomerium.io/reference/#jwt-claim-headers">identity claims</a> can be passed to upstream applications.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="category white box">
|
|
<div class="messages">
|
|
<div class="box-inner">
|
|
<div class="category-header clearfix">
|
|
<span class="category-title">Groups</span>
|
|
</div>
|
|
{{if .DirectoryGroups}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
{{range .DirectoryGroups}}
|
|
<td>{{.Id}}</td>
|
|
<td> {{.Name}} </td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
No groups found!
|
|
{{end}}
|
|
</div>
|
|
<div class="category-link">
|
|
Your associated groups are pulled from your <a href="https://www.pomerium.io/docs/identity-providers/">identity provider</a>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="category white box">
|
|
<div class="messages">
|
|
<div class="box-inner">
|
|
<div class="category-header clearfix">
|
|
<span class="category-title">Current Session Device Credentials</span>
|
|
<span class="experimental-icon"> </span>
|
|
</div>
|
|
{{if .CurrentDeviceCredentials}}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .CurrentDeviceCredentials}}
|
|
<tr>
|
|
<td>{{.ID}}</td>
|
|
<td>
|
|
<form action="{{$.WebAuthnURL}}" method="POST" class="delete-credential-form">
|
|
{{$.csrfField}}
|
|
<input type="hidden" name="action" value="unregister">
|
|
<input type="hidden" name="pomerium_device_credential_id" value="{{.ID}}">
|
|
<button type="submit">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
No device credentials found!
|
|
{{end}}
|
|
</div>
|
|
{{if .OtherDeviceCredentials}}
|
|
<div class="box-inner">
|
|
<div class="category-header clearfix">
|
|
<span class="category-title">Other Device Credentials</span>
|
|
</div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .OtherDeviceCredentials}}
|
|
<tr>
|
|
<td>{{.ID}}</td>
|
|
<td>
|
|
<form action="{{$.WebAuthnURL}}" method="POST" class="delete-credential-form">
|
|
{{$.csrfField}}
|
|
<input type="hidden" name="action" value="unregister">
|
|
<input type="hidden" name="pomerium_device_credential_id" value="{{.ID}}">
|
|
<button type="submit">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{end}}
|
|
<div class="category-link">
|
|
Register device with <a href="{{.WebAuthnURL}}">WebAuthn</a>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="footer">
|
|
<ul>
|
|
<li><a href="https://pomerium.com/">Home</a></li>
|
|
<li><a href="https://pomerium.com/docs">Docs</a></li>
|
|
<li><a href="https://pomerium.com/docs/community/">Support</a></li>
|
|
<li><a href="https://github.com/pomerium">Github</a></li>
|
|
<li class="last">
|
|
<a href="https://twitter.com/pomerium_io">@pomerium_io</a>
|
|
</li>
|
|
</ul>
|
|
<p>© Pomerium, Inc.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
|
|
<script>
|
|
function onDeleteDeviceCredential(evt) {
|
|
if (!confirm("Are you sure you want to delete this device credential? If a policy requires an approved device you may need to request a new approval from your administrator.")) {
|
|
evt.preventDefault();
|
|
}
|
|
}
|
|
|
|
Array.from(document.getElementsByClassName("delete-credential-form")).forEach(function(el) {
|
|
el.addEventListener("submit", onDeleteDeviceCredential);
|
|
});
|
|
</script>
|
|
|
|
</html>
|
|
{{end}}
|