Public Member Functions | |
AuthFile (string name_arg, fs::path users_file_arg) | |
string & | getError (void) |
bool | loadFile (void) |
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) |
Private Attributes | |
const fs::path | users_file |
string | error |
std::map< string, string > | users |
Definition at line 48 of file auth_file.cc.
bool auth_file::AuthFile::authenticate | ( | const identifier::User & | sctx, |
const string & | password | ||
) | [private] |
Base class method to check authentication for a user.
Definition at line 205 of file auth_file.cc.
References users, and verifyMySQLHash().
string & auth_file::AuthFile::getError | ( | void | ) |
Retrieve the last error encountered in the class.
Definition at line 107 of file auth_file.cc.
bool auth_file::AuthFile::loadFile | ( | void | ) |
Load the users file into a map cache.
Definition at line 112 of file auth_file.cc.
References users.
bool auth_file::AuthFile::verifyMySQLHash | ( | const string & | password, |
const string & | scramble_bytes, | ||
const string & | scrambled_password | ||
) | [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 159 of file auth_file.cc.
Referenced by authenticate().
std::map<string, string> auth_file::AuthFile::users [private] |
Cache or username:password entries from the file.
Definition at line 96 of file auth_file.cc.
Referenced by authenticate(), and loadFile().