mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-09-01 16:48:19 +00:00
20 lines
687 B
Go
20 lines
687 B
Go
// Copyright 2026 Beacon Contributors
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
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)
|
|
})
|
|
}
|