aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/templates/admin/view-oauth2-client.html
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/templates/admin/view-oauth2-client.html')
-rw-r--r--gn_auth/templates/admin/view-oauth2-client.html136
1 files changed, 50 insertions, 86 deletions
diff --git a/gn_auth/templates/admin/view-oauth2-client.html b/gn_auth/templates/admin/view-oauth2-client.html
index 415873d..c250ee3 100644
--- a/gn_auth/templates/admin/view-oauth2-client.html
+++ b/gn_auth/templates/admin/view-oauth2-client.html
@@ -13,118 +13,82 @@
{%set client = client.value%}
<form method="POST" action="{{url_for('oauth2.admin.edit_client')}}">
<legend>View/Edit Oauth2 Client</legend>
+
<input type="hidden" name="client_id" value="{{client.client_id}}" />
<input type="hidden" name="client_name" value="{{client.client_metadata.client_name}}" />
+
<div>
- <p><strong>Client ID: <strong> {{client.client_id}}</p>
- <p><strong>Client Name: <strong> {{client.client_metadata.client_name}}</p>
+ <p><strong>Client ID: </strong> {{client.client_id}}</p>
+ <p><strong>Client Name: </strong> {{client.client_metadata.client_name}}</p>
</div>
- <fieldset>
+
+ <div class="form-group">
<legend>Scope</legend>
{%for scp in scope%}
- <input name="scope[]" id="chk:{{scp}}" type="checkbox" value="{{scp}}"
- {%if scp in client.client_metadata.scope%}
- checked="checked"
- {%endif%} />
- <label for="chk:{{scp}}">{{scp}}</label><br />
+ <div class="checkbox">
+ <label for="chk:{{scp}}">
+ <input name="scope[]" id="chk:{{scp}}" type="checkbox" value="{{scp}}"
+ {%if scp in client.client_metadata.scope%}
+ checked="checked"
+ {%endif%} />
+ {{scp}}</label><br />
+ </div>
{%endfor%}
- </fieldset>
+ </div>
- <fieldset>
+ <div class="form-group">
<legend>Redirect URIs</legend>
- <label for="txt-redirect-uri">Default Redirect URI</label>
+ <label for="txt-redirect-uri" class="form-label">Default Redirect URI</label>
<br />
- <input type="text" name="redirect_uri" id="txt-redirect-uri"
+ <input type="text"
+ name="redirect_uri"
+ id="txt-redirect-uri"
value="{{client.client_metadata.default_redirect_uri}}"
required="required"
class="form-control" />
- <br /><br />
+ </div>
- <label for="txta:other-redirect-uris">Other Redirect URIs</label>
- <br />
+ <div class="form-group">
+ <label for="txta:other-redirect-uris"
+ class="form-label">Other Redirect URIs</label>
<textarea id="txta:other-redirect-uris"
name="other_redirect_uris"
cols="80" rows="10"
+ class="form-control"
title="Enter one URI per line."
>{{"\r\n".join(client.client_metadata.redirect_uris)}}</textarea>
- </fieldset>
+ </div>
- <fieldset>
+ <div class="form-group">
<legend>Grants</legend>
- {%for granttype in granttypes%}
- <input name="grants[]"
- type="checkbox"
- value="{{granttype.value}}"
- id="chk-{{granttype.name.lower().replace(' ', '-')}}"
- {%if granttype.value in client.client_metadata.grant_types%}
- checked="checked"
- {%endif%} />
+ {%for granttype in granttypes%}
+ <div class="checkbox">
<label for="chk-{{granttype.name.lower().replace(' ', '-')}}">
+ <input name="grants[]"
+ type="checkbox"
+ value="{{granttype.value}}"
+ id="chk-{{granttype.name.lower().replace(' ', '-')}}"
+ {%if granttype.value in client.client_metadata.grant_types%}
+ checked="checked"
+ {%endif%} />
{{granttype.name}}
</label>
- <br /><br />
- {%endfor%}
- </fieldset>
-
- <input type="submit" class="btn btn-primary" 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 method="POST"
- action="{{url_for('oauth2.admin.delete_client_public_key')}}">
- <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>
+ </div>
{%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>
+ </div>
+
+ <legend>Other metadata</legend>
+ <div class="form-group">
+ <label class="form-group" for="txt-client-jwk-uri">
+ Client's Public JWKs</label>
+ <input type="text"
+ id="txt-client-jwk-uri"
+ name="client_jwk_uri"
+ class="form-control"
+ value="{{client.client_metadata.get('public-jwks-uri', '')}}" />
+ </div>
- <br />
- <input type="submit" class="btn btn-primary" value="register key" />
+ <input type="submit" class="btn btn-primary" value="update client" />
</form>
{%endif%}