описал интерфейсную часть аутентификации, пока оставил без реализации
This commit is contained in:
23
src/auth/jwt.h
Normal file
23
src/auth/jwt.h
Normal 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
|
Reference in New Issue
Block a user