prototype for FindPackage install

This commit is contained in:
Christopher McArthur
2020-01-19 22:08:17 -05:00
parent b818478dde
commit f110d8d01f
5 changed files with 45 additions and 2 deletions

10
example/print-claims.cpp Normal file
View File

@@ -0,0 +1,10 @@
#include <jwt-cpp/jwt.h>
#include <iostream>
int main(int argc, const char** argv) {
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.to_json() << std::endl;
}