mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
🔭 Allow generic access to JWT header and payload (#251)
* 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
This commit is contained in:
@@ -32,7 +32,7 @@ int main() {
|
||||
|
||||
const auto decoded = jwt::decode(token);
|
||||
|
||||
const auto api_array = decoded.get_payload_claims()["object"].to_json().get("api").get("array");
|
||||
const auto api_array = decoded.get_payload_claim("object").to_json().get("api").get("array");
|
||||
std::cout << "api array = " << api_array << std::endl;
|
||||
|
||||
jwt::verify()
|
||||
|
||||
Reference in New Issue
Block a user