From 6d9c61dc0072b96b12153e64940b465306f25bfb Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 7 Aug 2023 07:58:09 +0300 Subject: Change imports to new unified db module. --- gn_auth/templates/admin/dashboard.html | 24 ++++++++ gn_auth/templates/admin/list-oauth2-clients.html | 56 +++++++++++++++++ gn_auth/templates/admin/login.html | 32 ++++++++++ gn_auth/templates/admin/register-client.html | 78 ++++++++++++++++++++++++ gn_auth/templates/admin/registered-client.html | 21 +++++++ gn_auth/templates/admin/view-oauth2-client.html | 75 +++++++++++++++++++++++ 6 files changed, 286 insertions(+) create mode 100644 gn_auth/templates/admin/dashboard.html create mode 100644 gn_auth/templates/admin/list-oauth2-clients.html create mode 100644 gn_auth/templates/admin/login.html create mode 100644 gn_auth/templates/admin/register-client.html create mode 100644 gn_auth/templates/admin/registered-client.html create mode 100644 gn_auth/templates/admin/view-oauth2-client.html (limited to 'gn_auth/templates/admin') diff --git a/gn_auth/templates/admin/dashboard.html b/gn_auth/templates/admin/dashboard.html new file mode 100644 index 0000000..7798022 --- /dev/null +++ b/gn_auth/templates/admin/dashboard.html @@ -0,0 +1,24 @@ +{%extends "base.html"%} + +{%block title%}Genenetwork3: Admin Dashboard{%endblock%} + +{%block pagetitle%}Admin Dashboard{%endblock%} + +{%block content%} +{{flash_messages()}} + + +{%endblock%} diff --git a/gn_auth/templates/admin/list-oauth2-clients.html b/gn_auth/templates/admin/list-oauth2-clients.html new file mode 100644 index 0000000..0104f0d --- /dev/null +++ b/gn_auth/templates/admin/list-oauth2-clients.html @@ -0,0 +1,56 @@ +{%extends "base.html"%} + +{%block title%}Genenetwork3: OAuth2 Clients{%endblock%} + +{%block pagetitle%}OAuth2 Clients{%endblock%} + +{%block content%} +{{flash_messages()}} + + + + + + + + + + + + + + + {%for client in clients%} + + + + + + + + + {%else%} + + + + {%endfor%} + + +{%endblock%} diff --git a/gn_auth/templates/admin/login.html b/gn_auth/templates/admin/login.html new file mode 100644 index 0000000..ac217ab --- /dev/null +++ b/gn_auth/templates/admin/login.html @@ -0,0 +1,32 @@ +{%extends "base.html"%} + +{%block title%}Log in to Genenetwork3{%endblock%} + +{%block pagetitle%}Admin Log In{%endblock%} + +{%block content%} +{{flash_messages()}} + +
+ +
+ User Credentials + + + +
+ + +
+ +
+ + +
+
+ + +
+{%endblock%} diff --git a/gn_auth/templates/admin/register-client.html b/gn_auth/templates/admin/register-client.html new file mode 100644 index 0000000..daac977 --- /dev/null +++ b/gn_auth/templates/admin/register-client.html @@ -0,0 +1,78 @@ +{%extends "base.html"%} + +{%block title%}Genenetwork3: Register OAuth2 Client{%endblock%} + +{%block pagetitle%}Register OAuth2 Client{%endblock%} + +{%block content%} +{{flash_messages()}} + +
+ +
+ Select client scope + + {%for scp in scope%} + +
+ {%endfor%} + +
+ +
+ Basic OAuth2 client information + + + + +

+ + + +

+ + +
+ +

+
+ Supported grant types + + +

+ + + +
+
+ +
+ User information + +

The user to register this client for

+ +
+ + +
+{%endblock%} diff --git a/gn_auth/templates/admin/registered-client.html b/gn_auth/templates/admin/registered-client.html new file mode 100644 index 0000000..5c46f4d --- /dev/null +++ b/gn_auth/templates/admin/registered-client.html @@ -0,0 +1,21 @@ +{%extends "base.html"%} + +{%block title%}Genenetwork3: Register OAuth2 Client{%endblock%} + +{%block pagetitle%}Register OAuth2 Client{%endblock%} + +{%block content%} +{{flash_messages()}} + +

Client has been registered successfully.

+ +

Please save the following client details somewhere. There is no way to + retrieve the the CLIENT_SECRET once you leave this page.

+ +
+
CLIENT_ID
+
{{client.client_id}}
+
CLIENT_SECRET
+
{{client_secret}}
+
+{%endblock%} diff --git a/gn_auth/templates/admin/view-oauth2-client.html b/gn_auth/templates/admin/view-oauth2-client.html new file mode 100644 index 0000000..b90428d --- /dev/null +++ b/gn_auth/templates/admin/view-oauth2-client.html @@ -0,0 +1,75 @@ +{%extends "base.html"%} + +{%block title%}Genenetwork3: View OAuth2 Client{%endblock%} + +{%block pagetitle%}View OAuth2 Client{%endblock%} + +{%block content%} +{{flash_messages()}} + +{%if client.is_nothing()%} +

No such client

+{%else%} +{%set client = client.value%} +
+ View/Edit Oauth2 Client + +
+

Client ID: {{client.client_id}}

+

Client Name: {{client.client_metadata.client_name}}

+
+
+ Scope + {%for scp in scope%} + +
+ {%endfor%} +
+ +
+ Redirect URIs + +
+ +

+ + +
+ +
+ +
+ Grants + + +

+ + + +
+ + + +{%endif%} +{%endblock%} -- cgit v1.2.3