#include <AuthFile.hpp>
Inheritance diagram for Ionflux::Tools::AuthFile:


Public Member Functions | |
| AuthFile () | |
| Constructor. | |
| AuthFile (const std::string &initAuthFile) | |
| Constructor. | |
| virtual | ~AuthFile () |
| Destructor. | |
| virtual void | setAuthFile (const std::string &newAuthFile) |
| Set authentication file. | |
| virtual bool | auth (const std::string &username, const std::string &password) |
| Authenticate user. | |
| virtual void | getSecret (const std::string &username, std::string &secret) |
| Get secret. | |
| virtual Reporter & | getLog () |
| Get Console output/logging facility. | |
| virtual void | printDebugInfo () |
| Print debug information. | |
Static Public Attributes | |
| static const TokenType | TT_USER_PASS_SEP |
| Token type: Username/password separator. | |
Protected Member Functions | |
| void | parse () |
| Parse authentication file. | |
Protected Attributes | |
| Ionflux::Tools::Reporter | log |
| Console output/logging. | |
| std::string | authFile |
| Authentication file name. | |
| std::vector< AuthData > | authData |
| Authentication data vector. | |
Reads authentication data from a file and validates user accounts against the data stored in the authentication file. Each line of the authentication file represents a valid username/password pair in the following format:
<username>:<password hash>
Where 'password hash' is the hex-encoded SHA-1 hash of the password.
|
|
Constructor. Construct new AuthFile object. |
|
|
Constructor. Construct new AuthFile object.
|
|
|
Destructor. Destruct AuthFile object. |
|
||||||||||||
|
Authenticate user. Authenticate a username/password pair.
Implements Ionflux::Tools::Auth. |
|
|
Get Console output/logging facility.
Implements Ionflux::Tools::Auth. |
|
||||||||||||
|
Get secret. Get the secret associated with a username. If the username is not valid, the secret will be set to an empty string. Note: The returned secret is the SHA-1 hash of the user's password.
Implements Ionflux::Tools::Auth. |
|
|
Parse authentication file. Extract authentication data records from authentication file. |
|
|
Print debug information.
|
|
|
Set authentication file. Set the authentication file name.
|
|
|
Authentication data vector.
|
|
|
Authentication file name.
|
|
|
Console output/logging.
|
|
|
Initial value: {
TokenType::USERTYPE_ID + 1, ":", false, 1}
|
1.4.6