Add mcp bearer header

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-02-20 20:27:25 +01:00
parent c9538ab287
commit e0589de2b7

View File

@@ -43,6 +43,7 @@ func RequireAPIKeyHandler(
apiKey := authn.APIKeyFromContext(ctx)
identity := authn.IdentityFromContext(ctx)
if identity == nil {
w.Header().Set("WWW-Authenticate", "Bearer")
httpserver.RenderError(w, http.StatusUnauthorized, errors.New("authentication required"))
return
}