feat: openid discovery endpoint

This commit is contained in:
Stavros
2026-01-26 19:50:15 +02:00
parent 328064946b
commit a8f57e584e
5 changed files with 79 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import (
"time"
"github.com/steveiliop56/tinyauth/internal/assets"
"github.com/steveiliop56/tinyauth/internal/utils/tlog"
"github.com/gin-gonic/gin"
)
@@ -39,11 +40,10 @@ func (m *UIMiddleware) Middleware() gin.HandlerFunc {
return func(c *gin.Context) {
path := strings.TrimPrefix(c.Request.URL.Path, "/")
tlog.App.Debug().Str("path", path).Msg("path")
switch strings.SplitN(path, "/", 2)[0] {
case "api":
c.Next()
return
case "resources":
case "api", "resources", ".well-known":
c.Next()
return
default: