|
Leosac
0.7.0
OpenSourceAccessControl
|
An authentication token used for authenticating a user against Leosac. More...
#include <Token.hpp>
Collaboration diagram for Leosac::Auth::Token:Public Member Functions | |
| Token () | |
| Token (const std::string &token, UserPtr owner) | |
| const std::string & | id () const |
| Return the token identifier. More... | |
| const std::string & | token () const |
| Retrieve the string representation of the token. More... | |
| bool | is_valid () const |
| Check if the token is still active. More... | |
| UserPtr | owner () const |
| Retrieve a shared_ptr to the user owning the token. More... | |
| boost::posix_time::ptime | expiration () const |
| Retrieve the unix timestamp at which the token will/has expire(d). More... | |
| template<typename T > | |
| void | expire_in (const T &duration) |
Set the expiration point of the token to be now + duration. More... | |
Public Attributes | |
| ssize_t | version_ |
Private Attributes | |
| std::string | token_ |
| The string representation of the token. More... | |
| UserPtr | owner_ |
| The user owning the token. More... | |
| boost::posix_time::ptime | expiration_ |
Friends | |
| class | odb::access |
An authentication token used for authenticating a user against Leosac.
The authentication token can be persisted in database. This lets user authenticate with the same token between reboot.
One token maps to one user.
| boost::posix_time::ptime Token::expiration | ( | ) | const |
|
inline |
| const std::string & Token::id | ( | ) | const |
| bool Token::is_valid | ( | ) | const |
| UserPtr Token::owner | ( | ) | const |
| const std::string & Token::token | ( | ) | const |
|
private |
|
private |
|
private |