Public Member Functions | |
AuthFile (std::string users_file_arg) | |
const string & | getError () const |
std::string & | getUsersFile () |
bool | setUsersFile (std::string &usersFile) |
Private Member Functions | |
bool | authenticate (const identifier::User &sctx, const string &password) |
bool | verifyMySQLHash (const string &password, const string &scramble_bytes, const string &scrambled_password) |
void | setUsers (users_t) |
void | clearUsers () |
Private Attributes | |
string | error |
fs::path | users_file |
std::string | sysvar_users_file |
users_t | users |
Definition at line 51 of file auth_file.cc.
|
private |
Base class method to check authentication for a user.
Definition at line 186 of file auth_file.cc.
References users, and verifyMySQLHash().
|
private |
This method is called to delete all the cached username:password pairs when users file is updated.
Definition at line 201 of file auth_file.cc.
References users.
const string & auth_file::AuthFile::getError | ( | ) | const |
Retrieve the last error encountered in the class.
Definition at line 113 of file auth_file.cc.
|
private |
This method is called to update the users cache with the new username:password pairs given in new users file upon update.
Definition at line 196 of file auth_file.cc.
References users.
|
private |
Verify the local and remote scrambled password match using the MySQL hashing algorithm.
[in] | password | Plain text password that is stored locally. |
[in] | scramble_bytes | The random bytes that the server sent to the client for scrambling the password. |
[in] | scrambled_password | The result of the client scrambling the password remotely. |
Definition at line 143 of file auth_file.cc.
Referenced by authenticate().
|
private |
Cache or username:password entries from the file.
Definition at line 93 of file auth_file.cc.
Referenced by authenticate(), clearUsers(), and setUsers().