added glob matching to auth middleware

This commit is contained in:
2026-02-01 19:55:04 +11:00
parent cd29f11296
commit 95a17597cf
5 changed files with 41 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ import (
"git.haelnorr.com/h/golib/hlog"
"git.haelnorr.com/h/golib/hws"
"git.haelnorr.com/h/golib/jwt"
"github.com/gobwas/glob"
"github.com/pkg/errors"
)
@@ -16,7 +17,7 @@ type Authenticator[T Model, TX DBTransaction] struct {
tokenGenerator *jwt.TokenGenerator
load LoadFunc[T, TX]
beginTx BeginTX
ignoredPaths []string
ignoredPaths []glob.Glob
logger *hlog.Logger
server *hws.Server
errorPage hws.ErrorPageFunc