7#include <userver/server/auth/user_auth_info.hpp>
8#include <userver/server/handlers/exceptions.hpp>
9#include <userver/server/http/http_request.hpp>
10#include <userver/server/request/request_context.hpp>
12USERVER_NAMESPACE_BEGIN
14namespace server::handlers::
auth {
19 kInternalCheckFailure,
25 Status status{Status::kOk};
26 std::optional<std::string> reason{};
27 std::optional<std::string> ext_reason{};
31const std::string& GetDefaultReasonForStatus(
AuthCheckResult::Status status);
36 virtual ~AuthCheckerBase();
39 const http::HttpRequest& request,
40 request::RequestContext& context)
const = 0;
42 [[
nodiscard]]
virtual bool SupportsUserAuth()
const noexcept = 0;
45 void SetUserAuthInfo(server::
request::RequestContext& request_context,
46 server::auth::UserAuthInfo&& info)
const;