фича: автообновление сессии
This commit is contained in:
@@ -70,20 +70,23 @@ namespace http::auth {
|
||||
* @note Класс устанавливает заголовок 'Set-Cookie' в ответе, и этот заголовок должен дойти до пользователя!
|
||||
*/
|
||||
class AuthProvider {
|
||||
void updateSessionHook();
|
||||
|
||||
public:
|
||||
AuthProvider();
|
||||
|
||||
/**
|
||||
* Авторизовать пользователя.
|
||||
*
|
||||
* @param req
|
||||
* @param rep
|
||||
* @return true, в случае успешной авторизации
|
||||
*/
|
||||
std::shared_ptr<http::auth::User> doAuth(const std::string &username, const std::string &password, server::Reply &rep);
|
||||
std::shared_ptr<http::auth::User> doAuth(const std::string &username, const std::string &password, const server::Request &req, server::Reply &rep);
|
||||
|
||||
std::vector<std::shared_ptr<User>> users;
|
||||
|
||||
std::shared_ptr<User> getSession(const server::Request &req);
|
||||
std::shared_ptr<User> getSession(const server::Request &req, server::Reply &rep);
|
||||
|
||||
~AuthProvider();
|
||||
};
|
||||
|
Reference in New Issue
Block a user