|
lintel 0.2.0
|
#include <UserSessionDto.h>
Public Member Functions | |
| UserSessionDto (const UserToken &userToken) | |
| UserSessionDto ()=default | |
| const std::string & | getId () const |
| const std::string & | getIpAddress () const |
| const std::string & | getUserName () const |
| const std::chrono::sys_time< std::chrono::microseconds > & | getLastAccessTimestamps () const |
| void | serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const override |
| bool | deserialize (const rapidjson::Value &obj) override |
Public Member Functions inherited from lintel::JsonSerializable | |
| JsonSerializable ()=default | |
| virtual | ~JsonSerializable ()=default |
| virtual std::string | serialize () const |
| virtual void | deserialize (const std::string &json) |
Static Public Member Functions | |
| static std::vector< UserSessionDto > | listOf (const std::vector< UserToken > &tokens) |
DTO representing an active user session.
Construct from a UserToken model
| userToken | the source session |
|
default |
Default constructor
Deserialize from JSON
| obj | the JSON value |
Reimplemented from lintel::JsonSerializable.
| const std::string & lintel::UserSessionDto::getId | ( | ) | const |
Get the session id
| const std::string & lintel::UserSessionDto::getIpAddress | ( | ) | const |
Get the IP address
| const std::chrono::sys_time< std::chrono::microseconds > & lintel::UserSessionDto::getLastAccessTimestamps | ( | ) | const |
Get the last access timestamp
| const std::string & lintel::UserSessionDto::getUserName | ( | ) | const |
Get the user name
|
static |
Build session DTOs from a list of user tokens.
| tokens | the source sessions |
|
overridevirtual |