aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/templates
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/templates')
-rw-r--r--gn_auth/templates/admin/confirm-change-client-secret.html45
-rw-r--r--gn_auth/templates/admin/list-oauth2-clients.html10
2 files changed, 54 insertions, 1 deletions
diff --git a/gn_auth/templates/admin/confirm-change-client-secret.html b/gn_auth/templates/admin/confirm-change-client-secret.html
new file mode 100644
index 0000000..aa8ef81
--- /dev/null
+++ b/gn_auth/templates/admin/confirm-change-client-secret.html
@@ -0,0 +1,45 @@
+{%extends "base.html"%}
+
+{%block title%}gn-auth: View OAuth2 Client{%endblock%}
+
+{%block pagetitle%}View OAuth2 Client{%endblock%}
+
+{%block content%}
+{{flash_messages()}}
+
+<h2>Change Oauth2 Client Secret</h2>
+
+<p>You are attempting to change the <strong>CLIENT_SECRET</strong> value for the
+ following client:</p>
+
+<table class="table">
+ <tbody>
+ <tr>
+ <td><strong>Client ID</strong></td>
+ <td>{{client.client_id}}</td>
+ </tr>
+ <tr>
+ <td><strong>Client Name</strong></td>
+ <td>{{client.client_metadata.client_name}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>Are you absolutely sure you want to do this?<br />
+ <small>Note that you'll need to update your configurations for the client and
+ restart it for the settings to take effect!</small></p>
+
+<form id="frm-change-client-secret"
+ method="POST"
+ action="{{url_for('oauth2.admin.change_client_secret',
+ client_id=client.client_id)}}">
+
+ <input type="hidden" name="client_id" value="{{client.client_id}}" />
+ <input type="hidden" name="client_name" value="{{client.client_metadata.client_name}}" />
+
+ <div class="form-group">
+ <input type="submit" class="btn btn-danger" value="generate new secret" />
+ </div>
+</form>
+
+{%endblock%}
diff --git a/gn_auth/templates/admin/list-oauth2-clients.html b/gn_auth/templates/admin/list-oauth2-clients.html
index ca0ee6d..6da5b2f 100644
--- a/gn_auth/templates/admin/list-oauth2-clients.html
+++ b/gn_auth/templates/admin/list-oauth2-clients.html
@@ -15,7 +15,7 @@
<th>Client Name</th>
<th>Default Redirect URI</th>
<th>Owner</th>
- <th colspan="2">Actions</th>
+ <th colspan="3">Actions</th>
</tr>
</thead>
@@ -43,6 +43,14 @@
class="btn btn-danger" />
</form>
</td>
+ <td>
+ <a href="{{url_for('oauth2.admin.change_client_secret',
+ client_id=client.client_id)}}"
+ title="Change the client secret!"
+ class="btn btn-danger">
+ Change Secret
+ </a>
+ </td>
</tr>
{%else%}
<tr>