MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mrs::authentication::WwwAuthenticationHandler Class Referenceabstract

#include <www_authentication_handler.h>

Inheritance diagram for mrs::authentication::WwwAuthenticationHandler:
[legend]

Classes

struct  Credentials
 

Public Member Functions

 WwwAuthenticationHandler (const AuthApp &entry, QueryFactory *qf)
 
UserManagerget_user_manager () override
 
- Public Member Functions inherited from mrs::interface::AuthorizeHandler
virtual ~AuthorizeHandler ()=default
 
virtual std::set< UniversalIdget_service_ids () const =0
 
virtual UniversalId get_id () const =0
 
virtual const std::string & get_handler_name () const =0
 
virtual void pre_authorize_account (AuthorizeHandler *handler, const std::string &account)=0
 

Static Public Attributes

constexpr static char kAuthorization [] = "Authorization"
 
constexpr static char kWwwAuthenticate [] = "WWW-Authenticate"
 

Protected Types

using SessionManager = mrs::http::SessionManager
 
using UserManager = mrs::users::UserManager
 
using QueryFactory = mrs::interface::QueryFactory
 
using Session = mrs::http::SessionManager::Session
 

Protected Member Functions

bool validate_redirection_url (const std::optional< std::string > &url)
 
std::optional< Credentialsauthorize_method_get (RequestContext &ctxt, Session *session)
 
std::optional< Credentialsauthorize_method_post (RequestContext &ctxt, Session *session)
 
virtual bool verify_credential (const Credentials &credentials, SqlSessionCached *out_cache, AuthUser *out_user)=0
 
void throw_add_www_authenticate (const char *schema)
 
bool redirects (RequestContext &ctxt) const override
 
bool authorize (RequestContext &ctxt, const SessionPtr &session, AuthUser *out_user) override
 
std::optional< std::string > get_session_id_from_request_data (RequestContext &) override
 
const AuthAppget_entry () const override
 

Protected Attributes

AuthApp entry_
 
UserManager um_
 

Additional Inherited Members

- Public Types inherited from mrs::interface::AuthorizeHandler
using SqlSessionCached = collector::MysqlCacheManager::CachedObject
 
using AuthUser = mrs::database::entry::AuthUser
 
using AuthApp = mrs::database::entry::AuthApp
 
using RequestContext = rest::RequestContext
 
using Session = http::SessionManager::Session
 
using SessionPtr = http::SessionManager::SessionPtr
 
using UserManager = mrs::users::UserManager
 

Member Typedef Documentation

◆ QueryFactory

◆ Session

◆ SessionManager

◆ UserManager

Constructor & Destructor Documentation

◆ WwwAuthenticationHandler()

mrs::authentication::WwwAuthenticationHandler::WwwAuthenticationHandler ( const AuthApp entry,
QueryFactory qf 
)
inline

Member Function Documentation

◆ authorize()

bool mrs::authentication::WwwAuthenticationHandler::authorize ( RequestContext ctxt,
const SessionPtr session,
AuthUser out_user 
)
overrideprotectedvirtual

◆ authorize_method_get()

std::optional< WwwAuthenticationHandler::Credentials > mrs::authentication::WwwAuthenticationHandler::authorize_method_get ( RequestContext ctxt,
Session session 
)
protected

◆ authorize_method_post()

std::optional< WwwAuthenticationHandler::Credentials > mrs::authentication::WwwAuthenticationHandler::authorize_method_post ( RequestContext ctxt,
Session session 
)
protected

◆ get_entry()

const AuthApp & mrs::authentication::WwwAuthenticationHandler::get_entry ( ) const
overrideprotectedvirtual

◆ get_session_id_from_request_data()

std::optional< std::string > mrs::authentication::WwwAuthenticationHandler::get_session_id_from_request_data ( RequestContext )
overrideprotectedvirtual

◆ get_user_manager()

UserManager & mrs::authentication::WwwAuthenticationHandler::get_user_manager ( )
inlineoverridevirtual

◆ redirects()

bool mrs::authentication::WwwAuthenticationHandler::redirects ( RequestContext ctxt) const
overrideprotectedvirtual

◆ throw_add_www_authenticate()

void mrs::authentication::WwwAuthenticationHandler::throw_add_www_authenticate ( const char *  schema)
protected

◆ validate_redirection_url()

bool mrs::authentication::WwwAuthenticationHandler::validate_redirection_url ( const std::optional< std::string > &  url)
protected

◆ verify_credential()

virtual bool mrs::authentication::WwwAuthenticationHandler::verify_credential ( const Credentials credentials,
SqlSessionCached out_cache,
AuthUser out_user 
)
protectedpure virtual

Member Data Documentation

◆ entry_

AuthApp mrs::authentication::WwwAuthenticationHandler::entry_
protected

◆ kAuthorization

constexpr static char mrs::authentication::WwwAuthenticationHandler::kAuthorization[] = "Authorization"
staticconstexpr

◆ kWwwAuthenticate

constexpr static char mrs::authentication::WwwAuthenticationHandler::kWwwAuthenticate[] = "WWW-Authenticate"
staticconstexpr

◆ um_

UserManager mrs::authentication::WwwAuthenticationHandler::um_
protected

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