fix(auth): Admin UI pages use OIDC session auth, API stays bearer token
This commit is contained in:
parent
c89f823cb6
commit
3f2a7b81cf
1 changed files with 5 additions and 3 deletions
|
|
@ -122,11 +122,13 @@ func main() {
|
||||||
}
|
}
|
||||||
uiHandler.RegisterRoutes(mux, combinedAuth)
|
uiHandler.RegisterRoutes(mux, combinedAuth)
|
||||||
|
|
||||||
// --- Admin routes (protected by bearer token) ---
|
// --- Admin API routes (JSON, protected by bearer token) ---
|
||||||
adminAuth := admin.TokenAuthMiddleware(cfg.Admin.SecretToken)
|
adminAuth := admin.TokenAuthMiddleware(cfg.Admin.SecretToken)
|
||||||
adminHandler.RegisterRoutes(mux, adminAuth)
|
adminHandler.RegisterRoutes(mux, adminAuth)
|
||||||
adminHandler.RegisterUIRoutes(mux, adminAuth)
|
|
||||||
adminHandler.RegisterHTMXRoutes(mux, adminAuth)
|
// --- Admin UI routes (Templ-rendered HTML, protected by OIDC session) ---
|
||||||
|
adminHandler.RegisterUIRoutes(mux, combinedAuth)
|
||||||
|
adminHandler.RegisterHTMXRoutes(mux, combinedAuth)
|
||||||
|
|
||||||
// --- OIDC config page — shows Authelia status ---
|
// --- OIDC config page — shows Authelia status ---
|
||||||
mux.HandleFunc("GET /auth/status", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("GET /auth/status", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue