Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
orbit::middleware::SessionManager Class Reference

Loads or creates the session for each request (req.session, req.session_id) and saves it when the response is sent. More...

#include <SessionManager.hpp>

Collaboration diagram for orbit::middleware::SessionManager:

Public Member Functions

 SessionManager (std::shared_ptr< SessionStore > store, SessionOptions options={})
 
bool operator() (http::HttpRequest &req, std::shared_ptr< http::ResponseWriter > writer)
 

Static Public Member Functions

static std::string generate_session_id ()
 

Private Attributes

std::shared_ptr< SessionStore > store_
 
SessionOptions options_
 

Detailed Description

Loads or creates the session for each request (req.session, req.session_id) and saves it when the response is sent.

Constructor & Destructor Documentation

◆ SessionManager()

orbit::middleware::SessionManager::SessionManager ( std::shared_ptr< SessionStore >  store,
SessionOptions  options = {} 
)

Member Function Documentation

◆ generate_session_id()

static std::string orbit::middleware::SessionManager::generate_session_id ( )
static

◆ operator()()

bool orbit::middleware::SessionManager::operator() ( http::HttpRequest &  req,
std::shared_ptr< http::ResponseWriter >  writer 
)

Member Data Documentation

◆ options_

SessionOptions orbit::middleware::SessionManager::options_
private

◆ store_

std::shared_ptr<SessionStore> orbit::middleware::SessionManager::store_
private

The documentation for this class was generated from the following file: