описал интерфейсную часть аутентификации, пока оставил без реализации

This commit is contained in:
2024-11-04 11:44:35 +03:00
parent d9967b69e8
commit 82b433c447
11 changed files with 107 additions and 28 deletions

23
src/auth/jwt.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef JWT_H
#define JWT_H
#include <string>
#include "resources.h"
namespace http::auth::jwt {
class Jwt {
public:
static Jwt fromCookies(const std::string& cookie);
static Jwt fromString(const std::string& cookie);
static Jwt fromUser(const std::string& User);
bool isValid();
std::string getUsername();
std::string asCookie();
~Jwt();
};
}
#endif //JWT_H