mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-09-02 09:03:45 +00:00
17 lines
602 B
Go
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)
|
|
})
|
|
}
|