diff --git a/neofs/api/user-auth.go b/neofs/api/user-auth.go index 3b3c431..99dd0fb 100644 --- a/neofs/api/user-auth.go +++ b/neofs/api/user-auth.go @@ -15,6 +15,7 @@ func AttachUserAuth(router *mux.Router, center *auth.Center, log *zap.Logger) { if err != nil { log.Error("failed to pass authentication", zap.Error(err)) WriteErrorResponse(r.Context(), w, getAPIError(ErrAccessDenied), r.URL) + return } h.ServeHTTP(w, r.WithContext(auth.SetBearerToken(r.Context(), bearerToken)))