#include <userver/server/handlers/auth/digest/standalone_checker.hpp>
Class for digest authentication checker. Implements a stand-alone digest-authentication logic.
Definition at line 41 of file standalone_checker.hpp.
Public Member Functions | |
AuthStandaloneCheckerBase (const AuthCheckerSettings &digest_settings, std::string &&realm, const SecdistConfig &secdist_config, std::size_t ways, std::size_t way_size) | |
bool | SupportsUserAuth () const noexcept override |
std::optional< UserData > | FetchUserData (const std::string &username) const override |
void | SetUserData (const std::string &username, const std::string &nonce, std::int64_t nonce_count, TimePoint nonce_creation_time) const override |
Sets user authentication data to storage. | |
void | PushUnnamedNonce (std::string nonce) const override |
Pushes "nonce" not tied to username to "Nonce Pool". | |
std::optional< TimePoint > | GetUnnamedNonceCreationTime (const std::string &nonce) const override |
Returns "nonce" creation time from "Nonce Pool" if exists. | |
virtual std::optional< UserData::HA1 > | GetHA1 (std::string_view username) const =0 |
AuthCheckResult | CheckAuth (const http::HttpRequest &request, request::RequestContext &request_context) const final |
The main checking function that is called for each request. | |
Protected Member Functions | |
void | SetUserAuthInfo (server::request::RequestContext &request_context, server::auth::UserAuthInfo &&info) const |
|
finalvirtualinherited |
The main checking function that is called for each request.
Implements server::handlers::auth::AuthCheckerBase.
|
overridevirtual |
The implementation should return std::nullopt if the user is not registered. If the user is registered, but he is not in storage, the implementation can create him with arbitrary data.
Implements server::handlers::auth::digest::AuthCheckerBase.
|
overridevirtual |
Returns "nonce" creation time from "Nonce Pool" if exists.
Implements server::handlers::auth::digest::AuthCheckerBase.
|
overridevirtual |
Pushes "nonce" not tied to username to "Nonce Pool".
Implements server::handlers::auth::digest::AuthCheckerBase.
|
overridevirtual |
Sets user authentication data to storage.
Implements server::handlers::auth::digest::AuthCheckerBase.
|
inlineoverridevirtualnoexcept |
Returns "true" if the checker is allowed to write authentication information about the user to the RequestContext.
Reimplemented from server::handlers::auth::digest::AuthCheckerBase.
Definition at line 51 of file standalone_checker.hpp.