#include <user.hpp>
Inherits noncopyable.
|
| user_manager (void) |
| construct a new user_manager object
|
|
virtual | ~user_manager () |
| virtual destructor
|
|
bool | empty (void) const |
| returns true if no users are defined
|
|
virtual bool | add_user (const std::string &username, const std::string &password) |
|
virtual bool | update_user (const std::string &username, const std::string &password) |
|
virtual bool | remove_user (const std::string &username) |
|
virtual user_ptr | get_user (const std::string &username) |
|
virtual user_ptr | get_user (const std::string &username, const std::string &password) |
|
|
typedef std::map< std::string, user_ptr > | user_map_t |
| data type for a map of usernames to user objects
|
|
user_manager base class for user container/manager
Definition at line 167 of file user.hpp.
◆ add_user()
virtual bool pion::user_manager::add_user |
( |
const std::string & |
username, |
|
|
const std::string & |
password |
|
) |
| |
|
inlinevirtual |
used to add a new user with plaintext password
- Parameters
-
username | name or identifier of the user to add |
password | plaintext password of the user to add |
- Returns
- false if user with such a name already exists
Definition at line 192 of file user.hpp.
References pion::user::user().
◆ get_user() [1/2]
virtual user_ptr pion::user_manager::get_user |
( |
const std::string & |
username | ) |
|
|
inlinevirtual |
Used to locate user object by username
Definition at line 282 of file user.hpp.
◆ get_user() [2/2]
virtual user_ptr pion::user_manager::get_user |
( |
const std::string & |
username, |
|
|
const std::string & |
password |
|
) |
| |
|
inlinevirtual |
Used to locate user object by username and password
Definition at line 294 of file user.hpp.
◆ remove_user()
virtual bool pion::user_manager::remove_user |
( |
const std::string & |
username | ) |
|
|
inlinevirtual |
used to remove given user
- Returns
- false if no user with such username
Definition at line 270 of file user.hpp.
◆ update_user()
virtual bool pion::user_manager::update_user |
( |
const std::string & |
username, |
|
|
const std::string & |
password |
|
) |
| |
|
inlinevirtual |
update password for given user
- Parameters
-
username | name or identifier of the user to update |
password | plaintext password of the user to update |
- Returns
- false if user with such a name doesn't exist
Definition at line 212 of file user.hpp.
References pion::user::user().
The documentation for this class was generated from the following file: