MySQL 8.4.2
Source Code Documentation
|
Base class representing SASL mechanism. More...
#include <auth_ldap_sasl_mechanism.h>
Public Member Functions | |
virtual | ~Sasl_mechanism ()=default |
Destructor. More... | |
virtual bool | preauthenticate (const char *user, const char *password) |
Preauthentication step, e.g. More... | |
virtual const char * | get_ldap_host () |
Get LDAP host. More... | |
virtual bool | get_default_user (std::string &name) |
Get default user name. More... | |
virtual const sasl_callback_t * | get_callbacks () |
Get list of supported SASL callbacks. More... | |
const char * | get_mechanism_name () |
Gets constans string describing mechanism name. More... | |
virtual bool | require_conclude_by_server () |
Check if the authentication method requires conclusion message from the server. More... | |
Static Public Member Functions | |
static bool | create_sasl_mechanism (const char *mechanism_name, Sasl_mechanism *&mechanism) |
SASL mechanism factory function. More... | |
Static Public Attributes | |
static const char | SASL_GSSAPI [] = "GSSAPI" |
GSSAPI string. More... | |
static const char | SASL_SCRAM_SHA1 [] = "SCRAM-SHA-1" |
SCRAM-SHA-1 string. More... | |
static const char | SASL_SCRAM_SHA256 [] = "SCRAM-SHA-256" |
SCRAM-SHA-256 string. More... | |
Protected Member Functions | |
Sasl_mechanism (const char *mechanism_name) | |
Constructor. More... | |
Private Attributes | |
const char * | m_mechanism_name |
name of the mechanism More... | |
Static Private Attributes | |
static const sasl_callback_t | callbacks [] |
array of SASL callbacks More... | |
Base class representing SASL mechanism.
The child classes are used to perform all mechanism specific SASL operations.
|
virtualdefault |
Destructor.
|
inlineprotected |
Constructor.
Made protected to avoid creating direct objects of this class.
mechanism_name | [in] name of the mechanism |
|
static |
SASL mechanism factory function.
Creates mechanism object based on mechanism name.
mechanism_name | [in] name of the mechanism |
mechanism | [out] created mechanism object |
true | success |
false | failure |
|
inlinevirtual |
Get list of supported SASL callbacks.
Reimplemented in auth_ldap_sasl_client::Sasl_mechanism_kerberos, and auth_ldap_sasl_client::Sasl_mechanism_scram.
|
inlinevirtual |
Get default user name.
Called if no user name was provided as parameter to the client. Most methods don't provide default user name.
name | [out] default user name |
Reimplemented in auth_ldap_sasl_client::Sasl_mechanism_kerberos.
|
inlinevirtual |
Get LDAP host.
Not needed by most methods, return nullptr by default.
Reimplemented in auth_ldap_sasl_client::Sasl_mechanism_kerberos.
|
inline |
Gets constans string describing mechanism name.
|
inlinevirtual |
Preauthentication step, e.g.
obtaining Kerberos ticket. Not needed by most methods, so the default implementation just returns success.
user | [in] user mname |
password | [in] user password |
Reimplemented in auth_ldap_sasl_client::Sasl_mechanism_kerberos.
|
inlinevirtual |
Check if the authentication method requires conclusion message from the server.
Most authentication mechanisms don't require to be concluded by MySQL server, so the base class implementation always returns false.
Reimplemented in auth_ldap_sasl_client::Sasl_mechanism_kerberos.
|
staticprivate |
array of SASL callbacks
|
private |
name of the mechanism
|
static |
GSSAPI string.
|
static |
SCRAM-SHA-1 string.
|
static |
SCRAM-SHA-256 string.