Logic for looking up and validating credentials for new connections.
More...
#include <authorizer.hpp>
|
std::size_t | size () const |
| Return the number of accounts in the manager.
|
|
void | new_user (std::string username, std::string password) |
| Create a new user in the account manager. More...
|
|
bool | has_account (std::string username) const |
| Return true if the username exists in the database. More...
|
|
SystemAccount< Handler > * | get_account (std::string username) |
| Return the account for the given username. More...
|
|
bool | is_valid (const std::string &username, const std::string &password) const |
| Return true if the username and password combination is valid. More...
|
|
template<typename Handler>
class OrderEntry::Authorizer< Handler >
Logic for looking up and validating credentials for new connections.
- Template Parameters
-
Handler | the handler type for the system accounts being managed |
◆ get_account()
template<typename Handler >
Return the account for the given username.
- Parameters
-
username | the username to look up in the database |
- Returns
- the account for the given username
◆ has_account()
template<typename Handler >
Return true if the username exists in the database.
- Parameters
-
username | the username to look up in the database |
- Returns
- true if the user exists, false otherwise
◆ is_valid()
template<typename Handler >
bool OrderEntry::Authorizer< Handler >::is_valid |
( |
const std::string & |
username, |
|
|
const std::string & |
password |
|
) |
| const |
|
inline |
Return true if the username and password combination is valid.
- Parameters
-
username | to username for the account |
password | the password for the user's account |
- Returns
- true if the combination is valid, false otherwise
◆ new_user()
template<typename Handler >
Create a new user in the account manager.
- Parameters
-
username | the username for the new account |
password | the password for the new account |
◆ operator<<
template<typename Handler >
std::ostream& operator<< |
( |
std::ostream & |
stream, |
|
|
const Authorizer< Handler > & |
authorizer |
|
) |
| |
|
friend |
Write the data from the authorizer to a stream.
- Parameters
-
stream | the stream to write the data to |
authorizer | the authorizer to write to the stream |
- Returns
- the stream with data from the authorizer written to it
The documentation for this class was generated from the following file: