MySQL 8.4.0
Source Code Documentation
user_registration.cc File Reference
#include <scope_guard.h>
#include <sstream>
#include <vector>
#include "client/include/user_registration.h"
#include "my_hostname.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql/service_mysql_alloc.h"
#include "mysqld_error.h"

Macros

#define QUERY_LENGTH   2048
 
#define MAX_QUERY_LENGTH   4096
 
#define ENCODING_LENGTH   4
 
#define CAPABILITY_BIT_LENGTH   1
 

Functions

bool parse_register_option (const char *what_factor, std::vector< unsigned int > &factors)
 This helper method parses –register-factor option values, and inserts the parsed values in list. More...
 
bool user_device_registration (MYSQL *mysql_handle, char *register_option, char *errmsg)
 This helper method is used to perform device registration against a user account. More...
 

Macro Definition Documentation

◆ CAPABILITY_BIT_LENGTH

#define CAPABILITY_BIT_LENGTH   1

◆ ENCODING_LENGTH

#define ENCODING_LENGTH   4

◆ MAX_QUERY_LENGTH

#define MAX_QUERY_LENGTH   4096

◆ QUERY_LENGTH

#define QUERY_LENGTH   2048

Function Documentation

◆ parse_register_option()

bool parse_register_option ( const char *  what_factor,
std::vector< unsigned int > &  factors 
)

This helper method parses –register-factor option values, and inserts the parsed values in list.

Parameters
[in]what_factorComma separated list of values, which specifies which factor requires registration. Valid values are "2", "3", "2,3" or "3,2"
[out]factorscontainer holding individual factors
Returns
true failed
false success

◆ user_device_registration()

bool user_device_registration ( MYSQL mysql_handle,
char *  register_option,
char *  errmsg 
)

This helper method is used to perform device registration against a user account.

Please refer How authentication_webauthn works? for more information.

Parameters
[in]mysql_handlemysql connection handle
[in]register_optionComma separated list of values, which specifies which factor requires registration. Valid values are "2", "3", "2,3" or "3,2"
[out]errmsgBuffer to hold error message in case of error.
Returns
true failed
false success