Drizzled Public API Documentation

auth_file::AuthFile Class Reference
Inheritance diagram for auth_file::AuthFile:

Public Member Functions

 AuthFile (fs::path users_file_arg)
 
const string & getError () const
 
bool loadFile ()
 

Private Types

typedef std::map< string, string > users_t
 

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

string error
 
const fs::path users_file
 
users_t users
 

Detailed Description

Definition at line 47 of file auth_file.cc.

Member Typedef Documentation

typedef std::map<string, string> auth_file::AuthFile::users_t
private

Cache or username:password entries from the file.

Definition at line 93 of file auth_file.cc.

Member Function Documentation

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 188 of file auth_file.cc.

References verifyMySQLHash().

const string & auth_file::AuthFile::getError ( ) const

Retrieve the last error encountered in the class.

Definition at line 103 of file auth_file.cc.

bool auth_file::AuthFile::loadFile ( )

Load the users file into a map cache.

Returns
True on success, false on error. If false is returned an error is set and can be retrieved with getError().

Definition at line 108 of file auth_file.cc.

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.

Parameters
[in]passwordPlain text password that is stored locally.
[in]scramble_bytesThe random bytes that the server sent to the client for scrambling the password.
[in]scrambled_passwordThe result of the client scrambling the password remotely.
Returns
True if the password matched, false if not.

Definition at line 145 of file auth_file.cc.

Referenced by authenticate().


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