Files
beacon-server/internal/api/middleware/auth.go
T
2026-05-20 11:40:04 -07:00

17 lines
602 B
Go

package middleware
import "net/http"
// NoopAuth is a placeholder for the authentication middleware that will be
// wired onto the private route group when auth is implemented (see Future
// Features → Admin authentication in the design doc).
//
// Replace this with a real JWT/session validation middleware before shipping
// any write endpoints or admin functionality.
func NoopAuth(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// TODO: validate bearer token, set user in context, return 401 on failure.
next.ServeHTTP(w, r)
})
}