mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-06-01 09:27:41 +00:00
Added new parameters for decode API
This commit is contained in:
parent
de38b3a82a
commit
09bc72c9f7
6 changed files with 107 additions and 6 deletions
Binary file not shown.
|
@ -1,6 +1,7 @@
|
|||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
#include <unordered_map>
|
||||
#include "jwt/jwt.hpp"
|
||||
|
||||
|
@ -31,7 +32,9 @@ void basic_jwt_object_test()
|
|||
jwt::jwt_object obj3{payload(um)};
|
||||
|
||||
obj3.add_claim("f", true)
|
||||
.add_claim("time", 176353563);
|
||||
.add_claim("time", 176353563)
|
||||
.add_claim("exp", std::chrono::system_clock::now())
|
||||
;
|
||||
|
||||
std::cout << jwt::to_json_str(obj3.payload(), true) << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue