// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include #include // The secrets a client has to present to read the current dataset (statistics, buffered images, // plots). Replaced whole by every accepted /start; empty means the dataset is not protected and // any request is accepted. Nothing reads the tokens back. class BearerTokens { mutable std::mutex m; std::vector tokens; public: // Empty strings are dropped: an empty token would accept a bare "Bearer " header. void Replace(std::vector input); // authorization = the raw Authorization header of the request, if it carried one. bool Accept(const std::optional &authorization) const; };