2023-12-23 20:23:38 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2023-12-28 20:26:08 +00:00
|
|
|
#include "request/accepting.h"
|
|
|
|
|
|
|
|
class Session : public Accepting {
|
2023-12-23 20:23:38 +00:00
|
|
|
public:
|
|
|
|
Session(unsigned int id, const std::string& access, const std::string& renew);
|
|
|
|
|
|
|
|
std::string getAccessToken() const;
|
|
|
|
std::string getRenewToken() const;
|
2023-12-28 20:26:08 +00:00
|
|
|
void accept(std::unique_ptr<Request> request) override;
|
2023-12-23 20:23:38 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned int id;
|
|
|
|
std::string access;
|
|
|
|
std::string renew;
|
2023-12-28 20:26:08 +00:00
|
|
|
std::unique_ptr<Request> polling;
|
2023-12-23 20:23:38 +00:00
|
|
|
};
|