Public Member Functions | |
AuthLDAP (string name_arg) | |
bool | initialize (void) |
bool | connect (void) |
string & | getError (void) |
Private Member Functions | |
bool | authenticate (const identifier::User &sctx, const string &password) |
void | lookupUser (const string &user) |
bool | verifyMySQLHash (const PasswordEntry &password, const string &scramble_bytes, const string &scrambled_password) |
Private Attributes | |
time_t | next_cache_expiration |
LDAP * | ldap |
string | error |
UserCache | users |
pthread_rwlock_t | lock |
Definition at line 60 of file auth_ldap.cc.
|
private |
Base class method to check authentication for a user.
Definition at line 203 of file auth_ldap.cc.
References lookupUser(), and verifyMySQLHash().
bool auth_ldap::AuthLDAP::connect | ( | void | ) |
Connect to the LDAP server.
Definition at line 161 of file auth_ldap.cc.
Referenced by initialize(), and lookupUser().
string & auth_ldap::AuthLDAP::getError | ( | void | ) |
Retrieve the last error encountered in the class.
Definition at line 198 of file auth_ldap.cc.
Referenced by lookupUser().
bool auth_ldap::AuthLDAP::initialize | ( | void | ) |
Initialize the LDAP connection.
Definition at line 149 of file auth_ldap.cc.
References connect().
|
private |
Lookup a user in LDAP.
[in] | Username | to lookup. |
Definition at line 273 of file auth_ldap.cc.
References connect(), and getError().
Referenced by authenticate().
|
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 356 of file auth_ldap.cc.
Referenced by authenticate().