Thalhammer / jwt-cpp

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

Cannot set jwk to header when generate the JWS #247

Closed lzha101 closed 1 year ago

lzha101 commented 1 year ago

What's your question?

Is it possible to add other header parameter names support?

Additional Context

From https://www.rfc-editor.org/rfc/rfc7515#section-4.1, it shows JWS supports other Header Parameter names besides alg, kid, typ. Is it possible to add other header parameter names, such as jku, jkw, etc?

prince-chrismc commented 1 year ago

https://github.com/Thalhammer/jwt-cpp/blob/0628011aebb109a0ec3cdb2499106b5fc718fe5a/include/jwt-cpp/jwt.h#L2756

Should do the trick for you!

lzha101 commented 1 year ago

Oh, yes. Thanks for the info. I missed this interface. It works for me. Thanks again.