MySQL 8.0.39
Source Code Documentation
HttpAuthRealmComponent Class Reference

public API of HttpAuthRealm plugin. More...

#include <http_auth_realm_component.h>

Public Types

using value_type = std::map< std::string, std::shared_ptr< HttpAuthRealm > >
 

Public Member Functions

void add_realm (const std::string &name, std::shared_ptr< HttpAuthRealm > realm)
 register a realm with a handler. More...
 
void remove_realm (const std::string &name)
 unregister a realm. More...
 
std::error_code authenticate (const std::string &inst, const std::string &username, const std::string &authdata)
 authenticate user with authdata against realm. More...
 
std::shared_ptr< HttpAuthRealmget (const std::string &inst)
 get realm by instance name. More...
 

Static Public Member Functions

static HttpAuthRealmComponentget_instance ()
 get singleton instance of the component. More...
 

Private Member Functions

 HttpAuthRealmComponent (HttpAuthRealmComponent const &)=delete
 
void operator= (HttpAuthRealmComponent const &)=delete
 
 HttpAuthRealmComponent ()=default
 

Private Attributes

std::mutex realms_m_
 
value_type auth_realms_
 

Detailed Description

public API of HttpAuthRealm plugin.

Member Typedef Documentation

◆ value_type

using HttpAuthRealmComponent::value_type = std::map<std::string, std::shared_ptr<HttpAuthRealm> >

Constructor & Destructor Documentation

◆ HttpAuthRealmComponent() [1/2]

HttpAuthRealmComponent::HttpAuthRealmComponent ( HttpAuthRealmComponent const &  )
privatedelete

◆ HttpAuthRealmComponent() [2/2]

HttpAuthRealmComponent::HttpAuthRealmComponent ( )
privatedefault

Member Function Documentation

◆ add_realm()

void HttpAuthRealmComponent::add_realm ( const std::string &  name,
std::shared_ptr< HttpAuthRealm realm 
)

register a realm with a handler.

◆ authenticate()

std::error_code HttpAuthRealmComponent::authenticate ( const std::string &  inst,
const std::string &  username,
const std::string &  authdata 
)

authenticate user with authdata against realm.

Parameters
instinstance name of realm
usernamename of user to authenticate
authdatacredentials of user
Returns
error
Return values
falseauthentication without error.

◆ get()

std::shared_ptr< HttpAuthRealm > HttpAuthRealmComponent::get ( const std::string &  inst)

get realm by instance name.

◆ get_instance()

HttpAuthRealmComponent & HttpAuthRealmComponent::get_instance ( )
static

get singleton instance of the component.

◆ operator=()

void HttpAuthRealmComponent::operator= ( HttpAuthRealmComponent const &  )
privatedelete

◆ remove_realm()

void HttpAuthRealmComponent::remove_realm ( const std::string &  name)

unregister a realm.

Member Data Documentation

◆ auth_realms_

value_type HttpAuthRealmComponent::auth_realms_
private

◆ realms_m_

std::mutex HttpAuthRealmComponent::realms_m_
private

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