mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
* adding clang-tidy and asan tests Playing with clang-tidy, we already had the rule removed in #166... running the static analyzer from CMake reproduced the report in many places... I suspect the macro and `new`/`delete` separation clang-tidy is just unable to understand. Running the problematic examples + tests with the ASAN enabled reported no problems * Apply suggestions from code review * Update lint.yml * applying linting rules * fix bad rename * formating * clang-tidy on jsoncons tests * and cmake-format to lint * cmake format improve change detection * Update lint.yml * apply linting
12 lines
330 B
C++
12 lines
330 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_claims())
|
|
std::cout << e.first << " = " << e.second << std::endl;
|
|
}
|