Thalhammer / jwt-cpp

A header only library for creating and validating json web tokens in c++
https://thalhammer.github.io/jwt-cpp/
MIT License
886 stars 241 forks source link

Allow to retrieve list of claims #231

Closed Ka0o0 closed 2 years ago

Ka0o0 commented 2 years ago

Currently, it is not possible to iterate over the list of claims of a JWK. With this commit, the JWK gains a new method that exposes the underlying claims so that the callee can do some processing with it. This might be useful, if someone wants to copy all claims to a new object.

prince-chrismc commented 2 years ago

Would it be possible to add a test case please? 🙏

prince-chrismc commented 2 years ago

Just a note to myself this is how its done for JWT payload and header claims

prince-chrismc commented 2 years ago

The method has previously been untested for other components 🙈