remove dead Auth() middleware method
All checks were successful
check / check (push) Successful in 2m7s

The Auth() method in internal/middleware/middleware.go only logged and
passed through without performing any actual authentication. It was
never referenced anywhere in the codebase — authentication is handled
per-handler via requireAuth in the handlers package.

closes #38
This commit is contained in:
user
2026-03-10 03:20:50 -07:00
parent f287fdf6d1
commit 15d85d169e

View File

@@ -142,20 +142,6 @@ func (mware *Middleware) CORS() func(http.Handler) http.Handler {
})
}
// Auth returns middleware that performs authentication.
func (mware *Middleware) Auth() func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(
func(
writer http.ResponseWriter,
request *http.Request,
) {
mware.log.Info("AUTH: before request")
next.ServeHTTP(writer, request)
})
}
}
// Metrics returns middleware that records HTTP metrics.
func (mware *Middleware) Metrics() func(http.Handler) http.Handler {
metricsMiddleware := ghmm.New(ghmm.Config{ //nolint:exhaustruct // optional fields