MantisBase v0.3.5
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 <wolfssl/wolfio.h>
13#include "../utils/utils.h"
14
15namespace mb
16{
35 class Auth
36 {
37 public:
48 static std::string createToken(const json& claims_params, int timeout = -1);
49
65 static json verifyToken(const std::string& token);
66 };
67} // mb
68
69#endif //JWTUNIT_H
JWT token creation and verification utilities.
Definition auth.h:36
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:16
nlohmann::json json
Shorten JSON namespace.
Definition context_store.h:18