userver: server::handlers::auth::digest::AuthStandaloneCheckerBase Class Reference
Loading...
Searching...
No Matches
server::handlers::auth::digest::AuthStandaloneCheckerBase Class Referenceabstract

Class for digest authentication checker. Implements a stand-alone digest-authentication logic. More...

#include <userver/server/handlers/auth/digest/standalone_checker.hpp>

+ Inheritance diagram for server::handlers::auth::digest::AuthStandaloneCheckerBase:
+ Collaboration diagram for server::handlers::auth::digest::AuthStandaloneCheckerBase:

Public Member Functions

 AuthStandaloneCheckerBase (const AuthCheckerSettings &digest_settings, std::string &&realm, std::size_t ways, std::size_t way_size)
 
bool SupportsUserAuth () const noexcept override
 
std::optional< UserDataFetchUserData (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::HA1GetHA1 (std::string_view username) const =0
 
- Public Member Functions inherited from server::handlers::auth::digest::AuthCheckerBase
 AuthCheckerBase (const AuthCheckerSettings &digest_settings, std::string &&realm)
 
 AuthCheckerBase (const AuthCheckerBase &)=delete
 
 AuthCheckerBase (AuthCheckerBase &&)=delete
 
AuthCheckerBaseoperator= (const AuthCheckerBase &)=delete
 
AuthCheckerBaseoperator= (AuthCheckerBase &&)=delete
 
AuthCheckResult CheckAuth (const http::HttpRequest &request, request::RequestContext &request_context) const final
 The main checking function that is called for each request.
 

Additional Inherited Members

- Protected Member Functions inherited from server::handlers::auth::AuthCheckerBase
void SetUserAuthInfo (server::request::RequestContext &request_context, server::auth::UserAuthInfo &&info) const
 

Detailed Description

Class for digest authentication checker. Implements a stand-alone digest-authentication logic.

Definition at line 42 of file standalone_checker.hpp.

Member Function Documentation

◆ FetchUserData()

std::optional< UserData > server::handlers::auth::digest::AuthStandaloneCheckerBase::FetchUserData ( const std::string &  username) const
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.

◆ GetUnnamedNonceCreationTime()

std::optional< TimePoint > server::handlers::auth::digest::AuthStandaloneCheckerBase::GetUnnamedNonceCreationTime ( const std::string &  nonce) const
overridevirtual

Returns "nonce" creation time from "Nonce Pool" if exists.

Implements server::handlers::auth::digest::AuthCheckerBase.

◆ PushUnnamedNonce()

void server::handlers::auth::digest::AuthStandaloneCheckerBase::PushUnnamedNonce ( std::string  nonce) const
overridevirtual

Pushes "nonce" not tied to username to "Nonce Pool".

Implements server::handlers::auth::digest::AuthCheckerBase.

◆ SetUserData()

void server::handlers::auth::digest::AuthStandaloneCheckerBase::SetUserData ( const std::string &  username,
const std::string &  nonce,
std::int64_t  nonce_count,
TimePoint  nonce_creation_time 
) const
overridevirtual

Sets user authentication data to storage.

Implements server::handlers::auth::digest::AuthCheckerBase.

◆ SupportsUserAuth()

bool server::handlers::auth::digest::AuthStandaloneCheckerBase::SupportsUserAuth ( ) const
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 48 of file standalone_checker.hpp.


The documentation for this class was generated from the following file: