MySQL 8.0.40
Source Code Documentation
st_mysql_validate_password Struct Reference

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

#include <plugin_validate_password.h>

Public Attributes

int interface_version
 
int(* validate_password )(mysql_string_handle password)
 Checks if a password is valid by the password policy. More...
 
int(* get_password_strength )(mysql_string_handle password)
 Calculates the strength of a password in the scale of 0 to 100. More...
 

Detailed Description

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

The policy is enfoced through st_mysql_validate_password::validate_password() that answers the question of whether this password is good enough or not.

There's one auxiliary function st_mysql_validate_password::get_password_strength() that can be used by password changing UIs to display a password strength meter as the user enters a password.

Since plugins may need that functionality there's a plugin service mysql_password_policy_service_st exposing it to other plugins.

There also is a default password policy plugin "validate_password" built into the server binary that implements this plugin API.

See also
mysql_password_policy_service_st

Member Data Documentation

◆ get_password_strength

int(* st_mysql_validate_password::get_password_strength) (mysql_string_handle password)

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

Parameters
passwordThe password to evaluate the strength of
Returns
The strength of the password (0-100)

◆ interface_version

int st_mysql_validate_password::interface_version

◆ validate_password

int(* st_mysql_validate_password::validate_password) (mysql_string_handle password)

Checks if a password is valid by the password policy.

Parameters
passwordThe password to validate
Return values
truepassword meets the password validation plugin policy
falsepassword does not meet the validation policy

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