MySQL  8.0.20
Source Code Documentation
Sasl_client Class Reference

#include <auth_ldap_sasl_client.h>

Public Member Functions

 Sasl_client ()
 
 ~Sasl_client ()
 
int initilize ()
 
void set_plugin_info (MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
 
void interact (sasl_interact_t *ilist)
 
int read_method_name_from_server ()
 SASL method is send from the Mysql server, and this is set by the client. More...
 
int sasl_start (char **client_output, int *client_output_length)
 
int sasl_step (char *server_in, int server_in_length, char **client_out, int *client_out_length)
 
int send_sasl_request_to_server (const unsigned char *request, int request_len, unsigned char **reponse, int *response_len)
 
void set_user_info (std::string name, std::string pwd)
 
std::string get_method ()
 

Static Public Member Functions

static void sasl_client_done_wrapper ()
 

Protected Attributes

char m_user_name [SASL_MAX_STR_SIZE]
 
char m_user_pwd [SASL_MAX_STR_SIZE]
 
char m_mechanism [SASL_MAX_STR_SIZE]
 
char m_service_name [SASL_MAX_STR_SIZE]
 
std::string m_ldap_server_host
 
sasl_conn_tm_connection
 
MYSQL_PLUGIN_VIOm_vio
 
MYSQLm_mysql
 
Sasl_mechanismm_sasl_mechanism
 

Constructor & Destructor Documentation

◆ Sasl_client()

Sasl_client::Sasl_client ( )

◆ ~Sasl_client()

Sasl_client::~Sasl_client ( )

Member Function Documentation

◆ get_method()

std::string Sasl_client::get_method ( )

◆ initilize()

int Sasl_client::initilize ( )

Creating sasl connection.

Set security properties.

◆ interact()

void Sasl_client::interact ( sasl_interact_t *  ilist)

◆ read_method_name_from_server()

int Sasl_client::read_method_name_from_server ( )

SASL method is send from the Mysql server, and this is set by the client.

SASL client and sasl server may support many sasl authentication methods and can negotiate in anyone. We want to enforce the SASL authentication set by the client.

Get authentication method from the server.

◆ sasl_client_done_wrapper()

void Sasl_client::sasl_client_done_wrapper ( )
static

◆ sasl_start()

int Sasl_client::sasl_start ( char **  client_output,
int *  client_output_length 
)

◆ sasl_step()

int Sasl_client::sasl_step ( char *  server_in,
int  server_in_length,
char **  client_out,
int *  client_out_length 
)

◆ send_sasl_request_to_server()

int Sasl_client::send_sasl_request_to_server ( const unsigned char *  request,
int  request_len,
unsigned char **  reponse,
int *  response_len 
)

Send the request to the MySQL server.

Get the sasl response from the MySQL server.

◆ set_plugin_info()

void Sasl_client::set_plugin_info ( MYSQL_PLUGIN_VIO vio,
MYSQL mysql 
)

◆ set_user_info()

void Sasl_client::set_user_info ( std::string  name,
std::string  pwd 
)

Member Data Documentation

◆ m_connection

sasl_conn_t* Sasl_client::m_connection
protected

◆ m_ldap_server_host

std::string Sasl_client::m_ldap_server_host
protected

◆ m_mechanism

char Sasl_client::m_mechanism[SASL_MAX_STR_SIZE]
protected

◆ m_mysql

MYSQL* Sasl_client::m_mysql
protected

◆ m_sasl_mechanism

Sasl_mechanism* Sasl_client::m_sasl_mechanism
protected

◆ m_service_name

char Sasl_client::m_service_name[SASL_MAX_STR_SIZE]
protected

◆ m_user_name

char Sasl_client::m_user_name[SASL_MAX_STR_SIZE]
protected

◆ m_user_pwd

char Sasl_client::m_user_pwd[SASL_MAX_STR_SIZE]
protected

◆ m_vio

MYSQL_PLUGIN_VIO* Sasl_client::m_vio
protected

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