MySQL 8.3.0
Source Code Documentation
MYSQL_SERVER_AUTH_INFO Struct Reference

Provides server plugin access to authentication information. More...

#include <plugin_auth.h>

Public Attributes

char * user_name
 User name as sent by the client and shown in USER(). More...
 
unsigned int user_name_length
 Length of user_name. More...
 
const char * auth_string
 Refers to multi_factor_auth_info based on which factor is being authenticated. More...
 
unsigned long auth_string_length
 Length of auth_string. More...
 
char authenticated_as [MYSQL_USERNAME_LENGTH+1]
 Matching account name as found in the mysql.user table. More...
 
char external_user [512]
 The unique user name that was used by the plugin to authenticate. More...
 
int password_used
 This only affects the "Authentication failed. Password used: %s" error message. More...
 
const char * host_or_ip
 Set to the name of the connected client host, if it can be resolved, or to its IP address otherwise. More...
 
unsigned int host_or_ip_length
 Length of host_or_ip. More...
 
const char * additional_auth_string
 Additional password. More...
 
unsigned long additional_auth_string_length
 Length of additional password. More...
 
unsigned int current_auth_factor
 Refers to which factor auth_string to consider during authentication. More...
 
auth_factor_descmulti_factor_auth_info
 Refers to authentication details of 1st, 2nd or 3rd factor authentication method. More...
 

Detailed Description

Provides server plugin access to authentication information.

Member Data Documentation

◆ additional_auth_string

const char* MYSQL_SERVER_AUTH_INFO::additional_auth_string

Additional password.

◆ additional_auth_string_length

unsigned long MYSQL_SERVER_AUTH_INFO::additional_auth_string_length

Length of additional password.

◆ auth_string

const char* MYSQL_SERVER_AUTH_INFO::auth_string

Refers to multi_factor_auth_info based on which factor is being authenticated.

◆ auth_string_length

unsigned long MYSQL_SERVER_AUTH_INFO::auth_string_length

Length of auth_string.

◆ authenticated_as

char MYSQL_SERVER_AUTH_INFO::authenticated_as[MYSQL_USERNAME_LENGTH+1]

Matching account name as found in the mysql.user table.

A plugin can override it with another name that will be used by MySQL for authorization, and shown in CURRENT_USER()

◆ current_auth_factor

unsigned int MYSQL_SERVER_AUTH_INFO::current_auth_factor

Refers to which factor auth_string to consider during authentication.

◆ external_user

char MYSQL_SERVER_AUTH_INFO::external_user[512]

The unique user name that was used by the plugin to authenticate.

Plugins should put null-terminated UTF-8 here. Available through the @EXTERNAL_USER variable.

◆ host_or_ip

const char* MYSQL_SERVER_AUTH_INFO::host_or_ip

Set to the name of the connected client host, if it can be resolved, or to its IP address otherwise.

◆ host_or_ip_length

unsigned int MYSQL_SERVER_AUTH_INFO::host_or_ip_length

Length of host_or_ip.

◆ multi_factor_auth_info

auth_factor_desc* MYSQL_SERVER_AUTH_INFO::multi_factor_auth_info

Refers to authentication details of 1st, 2nd or 3rd factor authentication method.

◆ password_used

int MYSQL_SERVER_AUTH_INFO::password_used

This only affects the "Authentication failed. Password used: %s" error message.

has the following values : 0 : s will be NO. 1 : s will be YES. 2 : there will be no s. Set it as appropriate or ignore at will.

◆ user_name

char* MYSQL_SERVER_AUTH_INFO::user_name

User name as sent by the client and shown in USER().

NULL if the client packet with the user name was not received yet.

◆ user_name_length

unsigned int MYSQL_SERVER_AUTH_INFO::user_name_length

Length of user_name.


The documentation for this struct was generated from the following file: