diff --git a/nodejs/routes/render.js b/nodejs/routes/render.js index c7bf913..f3dea9c 100644 --- a/nodejs/routes/render.js +++ b/nodejs/routes/render.js @@ -62,8 +62,9 @@ router.get('/profile', async function(req, res, next) { res.render('profile', {...values}); }); -router.get('/api-tokens', async function(req, res, next) { - res.render('api_tokens', {...values}); +// API Tokens is now a section on the Profile page. +router.get('/api-tokens', (req, res) => { + res.redirect(301, '/profile'); }); // Bare /login (the OIDC callback redirect target) and /login/. diff --git a/nodejs/views/api_tokens.ejs b/nodejs/views/api_tokens.ejs deleted file mode 100644 index 5aa27b0..0000000 --- a/nodejs/views/api_tokens.ejs +++ /dev/null @@ -1,162 +0,0 @@ -<%- include('top') %> - - - - - - -
-
-
-
New API Token
- -
-

A personal access token lets scripts and services call the proxy management API as you, with your permissions. Treat it like a password.

-
-
- - -
-
- - -
-
- - -
- -
-
-
-
-
- - -
-
-
{{ name }}
- {{ id_short }} -
- -
- {{ #description }}

{{ description }}

{{ /description }} -
-
Token ID
-
{{ id_short }}
-
Created
-
{{{ created_display }}}
-
Last used
-
{{{ last_used_display }}}
-
Expires
-
{{{ expires_display }}}
-
-
- -
-
-
-<%- include('bottom') %> \ No newline at end of file diff --git a/nodejs/views/profile.ejs b/nodejs/views/profile.ejs index e93156a..fa4c41f 100644 --- a/nodejs/views/profile.ejs +++ b/nodejs/views/profile.ejs @@ -101,4 +101,161 @@ + + + + + + +
+
+
+
New API Token
+ +
+

A personal access token lets scripts and services call the proxy management API as you, with your permissions. Treat it like a password.

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
+
+ + +
+
+
{{ name }}
+ {{ id_short }} +
+ +
+ {{ #description }}

{{ description }}

{{ /description }} +
+
Token ID
+
{{ id_short }}
+
Created
+
{{{ created_display }}}
+
Last used
+
{{{ last_used_display }}}
+
Expires
+
{{{ expires_display }}}
+
+
+ +
+
+
<%- include('bottom') %> diff --git a/nodejs/views/top.ejs b/nodejs/views/top.ejs index 8119541..e81071c 100755 --- a/nodejs/views/top.ejs +++ b/nodejs/views/top.ejs @@ -66,16 +66,6 @@ Groups - -