mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
* boost print header claims * type * update other example * lint * update example * update example * update examples * tidy * renaming to clarity * delete old check in traits * return underlying type
12 lines
328 B
C++
12 lines
328 B
C++
#include <iostream>
|
|
#include <jwt-cpp/jwt.h>
|
|
|
|
int main() {
|
|
std::string token =
|
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXUyJ9.eyJpc3MiOiJhdXRoMCJ9.AbIJTDMFc7yUa5MhvcP03nJPyCPzZtQcGEp-zWfOkEE";
|
|
auto decoded = jwt::decode(token);
|
|
|
|
for (auto& e : decoded.get_payload_json())
|
|
std::cout << e.first << " = " << e.second << std::endl;
|
|
}
|