Mantis App v0.1.13
Loading...
Searching...
No Matches
jwt.h
Go to the documentation of this file.
1
8#ifndef JWT_H
9#define JWT_H
10
11#include <string>
12#include <nlohmann/json.hpp>
13
14#include "logging.h"
15
16namespace mantis
17{
18 using json = nlohmann::json;
19
23 class JWT
24 {
25 public:
35 static json createJWTToken(const json& claims_params, const std::string& secretKey);
46 static json verifyJWTToken(const std::string& token, const std::string& secretKey);
47 };
48} // mantis
49
50#endif //JWT_H
Definition jwt.h:24
static json verifyJWTToken(const std::string &token, const std::string &secretKey)
Verify if given token is valid and was created by us.
Definition jwt.cpp:106
static json createJWTToken(const json &claims_params, const std::string &secretKey)
Generate a JWT token having some custom claims.
Definition jwt.cpp:16
Wrapper around spdlog's functionality.
nlohmann::json json
Definition mantis.h:35
router.h
Definition app.h:30
nlohmann::json json
Shorten JSON namespace.
Definition crud.h:14