MantisBase v0.3.4
Loading...
Searching...
No Matches
auth.h
Go to the documentation of this file.
1
8#ifndef JWTUNIT_H
9#define JWTUNIT_H
10
11#include <string>
12#include "../utils/utils.h"
13
14namespace mb
15{
34 class Auth
35 {
36 public:
47 static std::string createToken(const json& claims_params, int timeout = -1);
48
64 static json verifyToken(const std::string& token);
65 };
66} // mb
67
68#endif //JWTUNIT_H
JWT token creation and verification utilities.
Definition auth.h:35
static json verifyToken(const std::string &token)
Verify JWT token and extract claims.
Definition auth.cpp:54
static std::string createToken(const json &claims_params, int timeout=-1)
Create JWT token with custom claims.
Definition auth.cpp:10
router.h
Definition auth.h:15
nlohmann::json json
Shorten JSON namespace.
Definition context_store.h:18