From 7e301b8ecb50e84b432aa2942aec0c180e0836ad Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Wed, 26 Mar 2025 12:32:16 +0100 Subject: [PATCH 1/9] admin: Replace PKI page by authentication settings, refactor --- admin/api/password.go | 5 ++ admin/index.go | 2 +- admin/static.go | 3 ++ admin/static/js/app.js | 77 +++++++++++++++++++------------ admin/static/views/auth.html | 57 +++++++++++++++++++++++ admin/static/views/team-list.html | 3 +- 6 files changed, 114 insertions(+), 33 deletions(-) create mode 100644 admin/static/views/auth.html diff --git a/admin/api/password.go b/admin/api/password.go index 349f65e5..1941df38 100644 --- a/admin/api/password.go +++ b/admin/api/password.go @@ -34,6 +34,11 @@ func declarePasswordRoutes(router *gin.RouterGroup) { c.JSON(http.StatusOK, gin.H{"password": passwd}) }) + router.GET("/oauth-status", func(c *gin.Context) { + c.JSON(http.StatusOK, gin.H{ + "secret_defined": OidcSecret != "", + }) + }) router.GET("/dex.yaml", func(c *gin.Context) { cfg, err := genDexConfig() if err != nil { diff --git a/admin/index.go b/admin/index.go index fa457641..42c6f52f 100644 --- a/admin/index.go +++ b/admin/index.go @@ -95,7 +95,7 @@ const indextpl = `