aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/templates/admin/view-oauth2-client.html
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-05-02 07:50:14 +0300
committerFrederick Muriuki Muriithi2024-05-02 07:50:14 +0300
commitdcfafd9805cf588c9da201333789157713dae7af (patch)
tree9de4de1f3eb124fef6e831e5af5ca2d03e2ee0a9 /gn_auth/templates/admin/view-oauth2-client.html
parent77a58474da1b3827b3683b0195bc7cbacddbaf4a (diff)
downloadgn-auth-dcfafd9805cf588c9da201333789157713dae7af.tar.gz
Register a client's public key(s).
Diffstat (limited to 'gn_auth/templates/admin/view-oauth2-client.html')
-rw-r--r--gn_auth/templates/admin/view-oauth2-client.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/gn_auth/templates/admin/view-oauth2-client.html b/gn_auth/templates/admin/view-oauth2-client.html
index 97993e8..38e48c7 100644
--- a/gn_auth/templates/admin/view-oauth2-client.html
+++ b/gn_auth/templates/admin/view-oauth2-client.html
@@ -67,5 +67,63 @@
<input type="submit" value="update client" />
</form>
+
+<hr />
+<h2>Signing/Verification SSL Keys</h2>
+<table>
+ <caption>Registered Public Keys</caption>
+ <thead>
+ <tr>
+ <th>JWK Thumbprint</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {%for sslkey in client.jwks.keys:%}
+ <tr>
+ <td>{{sslkey.thumbprint()}}</td>
+ <td>
+ <form>
+ <input type="hidden"
+ name="client_id"
+ value="{{client.client_id}}" />
+ <input type="hidden"
+ name="ssl_key"
+ value="{{sslkey.thumbprint()}}" />
+ <input type="submit"
+ class="btn btn-danger"
+ value="delete key" />
+ </form>
+ </td>
+ </tr>
+ {%else%}
+ <tr>
+ <td class="alert-warning"
+ colspan="2">
+ There are no registered SSL keys for this client.
+ </td>
+ </tr>
+ {%endfor%}
+ </tbody>
+</table>
+<form id="frm-client-add-ssl-key"
+ method="POST"
+ action="{{url_for('oauth2.admin.register_client_public_key')}}">
+ <legend>Register new SSL key</legend>
+ <input type="hidden" name="client_id" value="{{client.client_id}}" />
+ <fieldset>
+ <label for="txt-area-client-ssl-key">Client's Public Key</label>
+ <textarea id="txt-area-client-ssl-key"
+ name="client_ssl_key"
+ required="required"
+ class="form-control"
+ rows="10"></textarea>
+ </fieldset>
+
+ <br />
+ <input type="submit" class="btn btn-primary" value="register key" />
+</form>
+
{%endif%}
{%endblock%}