MySQL 8.0.32
Source Code Documentation
s_mysql_validate_password Struct Reference

This component defines interface that the server uses to enforce a password policy. More...

#include <validate_password.h>

Public Attributes

mysql_service_status_t(* validate )(void *thd, my_h_string password)
 Checks if a password is valid by the password policy. More...
 
mysql_service_status_t(* get_strength )(void *thd, my_h_string password, unsigned int *strength)
 Calculates the strength of a password in the scale of 0 to 100. More...
 

Detailed Description

This component defines interface that the server uses to enforce a password policy.

The policy is enfoced through two methods 1) validate_password_imp::validate() that answers the question of whether this password is good enough or not.

2) validate_password_imp::get_strength() that can be used by password changing UIs to display a password strength meter in the range of [0-100] as the user enters a password.

Member Data Documentation

◆ get_strength

mysql_service_status_t(* s_mysql_validate_password::get_strength) (void *thd, my_h_string password, unsigned int *strength)

Calculates the strength of a password in the scale of 0 to 100.

Parameters
thdMYSQL THD object
passwordGiven Password
[out]strengthpointer to handle the strength of the given password. in the range of [0-100], where 0 is week password and 100 is strong password
Returns
Status of performed operation
false success
true failure

◆ validate

mysql_service_status_t(* s_mysql_validate_password::validate) (void *thd, my_h_string password)

Checks if a password is valid by the password policy.

Parameters
thdMYSQL THD object
passwordGiven Password
Returns
Status of performed operation
false success (valid password)
true failure (invalid password)

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