MySQL 8.0.39
Source Code Documentation
ACL_USER::Password_locked_state Class Reference

#include <sql_auth_cache.h>

Public Member Functions

bool is_active () const
 
int get_password_lock_time_days () const
 
uint get_failed_login_attempts () const
 
void set_parameters (uint password_lock_time_days, uint failed_login_attempts)
 
bool update (THD *thd, bool successful_login, long *ret_days_remaining)
 Updates the password locked state based on the time of day fetched from the THD. More...
 
 Password_locked_state ()
 

Protected Attributes

int m_password_lock_time_days
 read from the user config. More...
 
uint m_failed_login_attempts
 read from the user config. More...
 
uint m_remaining_login_attempts
 The remaining login tries, valid only if m_failed_login_attempts and m_password_lock_time_days are non-zero. More...
 
long m_daynr_locked
 The day the account is locked, 0 if not locked. More...
 

Constructor & Destructor Documentation

◆ Password_locked_state()

ACL_USER::Password_locked_state::Password_locked_state ( )
inline

Member Function Documentation

◆ get_failed_login_attempts()

uint ACL_USER::Password_locked_state::get_failed_login_attempts ( ) const
inline

◆ get_password_lock_time_days()

int ACL_USER::Password_locked_state::get_password_lock_time_days ( ) const
inline

◆ is_active()

bool ACL_USER::Password_locked_state::is_active ( ) const
inline

◆ set_parameters()

void ACL_USER::Password_locked_state::set_parameters ( uint  password_lock_time_days,
uint  failed_login_attempts 
)

◆ update()

bool ACL_USER::Password_locked_state::update ( THD thd,
bool  successful_login,
long *  ret_days_remaining 
)

Updates the password locked state based on the time of day fetched from the THD.

Parameters
thdthe session to use to calculate time
successful_logintrue if the login succeeded
[out]ret_days_remainingremaining number of days. Filled only if update returns locked account
Return values
falseaccount not locked
trueaccount locked

Member Data Documentation

◆ m_daynr_locked

long ACL_USER::Password_locked_state::m_daynr_locked
protected

The day the account is locked, 0 if not locked.

◆ m_failed_login_attempts

uint ACL_USER::Password_locked_state::m_failed_login_attempts
protected

read from the user config.

The number of failed login attempts before the account is locked

◆ m_password_lock_time_days

int ACL_USER::Password_locked_state::m_password_lock_time_days
protected

read from the user config.

The number of days to keep the account locked

◆ m_remaining_login_attempts

uint ACL_USER::Password_locked_state::m_remaining_login_attempts
protected

The remaining login tries, valid only if m_failed_login_attempts and m_password_lock_time_days are non-zero.


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