MySQL 8.0.31
Source Code Documentation
Security_context_factory Class Reference

Factory for creating any Security_context given a pre-constructed policy. More...

#include <auth_common.h>

Public Member Functions

 Security_context_factory (THD *thd, std::string user, std::string host, Security_context_functor extend_user_profile, Security_context_functor priv, Security_context_functor static_priv, std::function< void(Security_context *)> drop_policy)
 Default Security_context factory implementation. More...
 
Sctx_ptr< Security_contextcreate ()
 

Private Member Functions

bool apply_pre_constructed_policies (Security_context *sctx)
 

Private Attributes

THDm_thd
 
std::string m_user
 
std::string m_host
 
Security_context_functor m_user_profile
 
Security_context_functor m_privileges
 
Security_context_functor m_static_privileges
 
const std::function< void(Security_context *)> m_drop_policy
 

Detailed Description

Factory for creating any Security_context given a pre-constructed policy.

Constructor & Destructor Documentation

◆ Security_context_factory()

Security_context_factory::Security_context_factory ( THD thd,
std::string  user,
std::string  host,
Security_context_functor  extend_user_profile,
Security_context_functor  priv,
Security_context_functor  static_priv,
std::function< void(Security_context *)>  drop_policy 
)
inline

Default Security_context factory implementation.

Given two policies and a authid this class returns a Security_context.

Parameters
thdThe thread handle
userUser name associated with auth id
hostHost name associated with auth id
extend_user_profileThe policy for creating the user profile
privThe policy for authorizing the authid to use the server.
static_privStatic privileges for authid.
drop_policyThe policy for deleting the authid and revoke privileges

Member Function Documentation

◆ apply_pre_constructed_policies()

bool Security_context_factory::apply_pre_constructed_policies ( Security_context sctx)
private

◆ create()

Sctx_ptr< Security_context > Security_context_factory::create ( )

Member Data Documentation

◆ m_drop_policy

const std::function<void(Security_context *)> Security_context_factory::m_drop_policy
private

◆ m_host

std::string Security_context_factory::m_host
private

◆ m_privileges

Security_context_functor Security_context_factory::m_privileges
private

◆ m_static_privileges

Security_context_functor Security_context_factory::m_static_privileges
private

◆ m_thd

THD* Security_context_factory::m_thd
private

◆ m_user

std::string Security_context_factory::m_user
private

◆ m_user_profile

Security_context_functor Security_context_factory::m_user_profile
private

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