|
static constexpr const char * | cookie_name = "sessionId" |
|
◆ manager() [1/3]
manager::manager |
( |
std::shared_ptr< storage > |
storage | ) |
|
|
explicit |
Constructor.
This will throw std::invalid_argument
if no valid storage is provided.
- Parameters
-
storage | The session storage to use. |
◆ manager() [2/3]
malloy::http::sessions::manager::manager |
( |
const manager & |
other | ) |
|
|
delete |
Copy constructor.
- Parameters
-
◆ manager() [3/3]
malloy::http::sessions::manager::manager |
( |
manager && |
other | ) |
|
|
deletenoexcept |
Move constructor.
- Parameters
-
◆ ~manager()
virtual malloy::http::sessions::manager::~manager |
( |
| ) |
|
|
virtualdefault |
◆ destroy()
Destroys an existing session.
- Parameters
-
req | The request. |
resp | The response. |
- See also
- start()
◆ destroy_expired()
std::size_t manager::destroy_expired |
( |
const std::chrono::seconds & |
max_lifetime | ) |
|
Destroys any sessions older than the specified max lifetime.
- Parameters
-
max_lifetime | The maximum lifetime of a session. |
- Returns
- The number of sessions that were expired/destroyed.
◆ get() [1/3]
std::shared_ptr< session > manager::get |
( |
const id_type & |
id | ) |
|
Get an existing session (if any).
- Parameters
-
- Returns
- The session (if any).
- See also
- start()
◆ get() [2/3]
std::shared_ptr< session > malloy::http::sessions::manager::get |
( |
const request<> & |
req | ) |
|
|
inline |
Get an existing session (if any).
- Parameters
-
- Returns
- The session (if any).
- See also
- start()
◆ get() [3/3]
Get an existing session (if any).
- Parameters
-
hdr | The HTTP request header. |
- Returns
- The session (if any).
- See also
- start()
◆ is_valid() [1/3]
bool manager::is_valid |
( |
const id_type & |
id | ) |
|
Checks whether the session is valid.
- Parameters
-
- Returns
- Whether the session is valid.
◆ is_valid() [2/3]
Checks whether the session is valid.
- Parameters
-
- Returns
- Whether the session is valid.
◆ is_valid() [3/3]
bool malloy::http::sessions::manager::is_valid |
( |
const request<> & |
req | ) |
|
|
inline |
Checks whether the session is valid.
- Parameters
-
- Returns
- Whether the session is valid.
◆ operator=() [1/2]
manager & malloy::http::sessions::manager::operator= |
( |
const manager & |
rhs | ) |
|
|
delete |
Copy assignment operator.
- Parameters
-
- Returns
◆ operator=() [2/2]
manager & malloy::http::sessions::manager::operator= |
( |
manager && |
rhs | ) |
|
|
deletenoexcept |
Move assignment operator.
- Parameters
-
- Returns
◆ start()
Get an existing session (if any) or create a new one.
- Parameters
-
req | The request. |
resp | The response. |
- Returns
- The session.
- See also
- get()
-
delete()
◆ cookie_name
constexpr const char* malloy::http::sessions::manager::cookie_name = "sessionId" |
|
staticconstexpr |
Name of the session cookie
The documentation for this class was generated from the following files:
- lib/malloy/core/http/session/manager.hpp
- lib/malloy/core/http/session/manager.cpp