mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 00:40:25 +02:00
dashboard: improve display of device credentials, allow deletion (#2829)
* dashboard: improve display of device credentials, allow deletion * fix test
This commit is contained in:
parent
c064bc8e0e
commit
838c9e3a3d
8 changed files with 225 additions and 36 deletions
|
@ -182,10 +182,10 @@
|
|||
<div class="messages">
|
||||
<div class="box-inner">
|
||||
<div class="category-header clearfix">
|
||||
<span class="category-title">Device Credentials</span>
|
||||
<span class="category-title">Current Session Device Credentials</span>
|
||||
</div>
|
||||
</ul>
|
||||
{{if .DeviceCredentials}}
|
||||
{{if .CurrentDeviceCredentials}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -193,9 +193,17 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .DeviceCredentials}}
|
||||
{{range .CurrentDeviceCredentials}}
|
||||
<tr>
|
||||
<td>{{.Id}}</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td>
|
||||
<form action="{{$.WebAuthnURL}}" method="POST">
|
||||
{{$.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>
|
||||
|
@ -204,6 +212,35 @@
|
|||
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">
|
||||
{{$.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>
|
||||
|
|
|
@ -147,6 +147,9 @@ body {
|
|||
.box-inner {
|
||||
padding: 35px;
|
||||
}
|
||||
.box-inner ~ .box-inner {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: white;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,16 +4,17 @@ package urlutil
|
|||
// services over HTTP calls and redirects. They are typically used in
|
||||
// conjunction with a HMAC to ensure authenticity.
|
||||
const (
|
||||
QueryCallbackURI = "pomerium_callback_uri"
|
||||
QueryDeviceType = "pomerium_device_type"
|
||||
QueryEnrollmentToken = "pomerium_enrollment_token" //nolint
|
||||
QueryIsProgrammatic = "pomerium_programmatic"
|
||||
QueryForwardAuth = "pomerium_forward_auth"
|
||||
QueryPomeriumJWT = "pomerium_jwt"
|
||||
QuerySession = "pomerium_session"
|
||||
QuerySessionEncrypted = "pomerium_session_encrypted"
|
||||
QueryRedirectURI = "pomerium_redirect_uri"
|
||||
QueryForwardAuthURI = "uri"
|
||||
QueryCallbackURI = "pomerium_callback_uri"
|
||||
QueryDeviceCredentialID = "pomerium_device_credential_id"
|
||||
QueryDeviceType = "pomerium_device_type"
|
||||
QueryEnrollmentToken = "pomerium_enrollment_token" //nolint
|
||||
QueryIsProgrammatic = "pomerium_programmatic"
|
||||
QueryForwardAuth = "pomerium_forward_auth"
|
||||
QueryPomeriumJWT = "pomerium_jwt"
|
||||
QuerySession = "pomerium_session"
|
||||
QuerySessionEncrypted = "pomerium_session_encrypted"
|
||||
QueryRedirectURI = "pomerium_redirect_uri"
|
||||
QueryForwardAuthURI = "uri"
|
||||
)
|
||||
|
||||
// URL signature based query params used for verifying the authenticity of a URL.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue