arun11299/cpp-jwt

Asymmetric API - can set system_time_t, but not get

GeneratedNickname opened this issue · 2 comments

The method add_claim has an overload for system_time_t, but get_claim_value does not. One would expect symmetry in that regard.

obj.add_claim(jwt::registered_claims::issued_at, chrono::system_clock::now());
auto iat = obj.payload().get_claim_value<chrono::system_clock::time_point>(jwt::registered_claims::issued_at); // Does not compile.

Thanks! Do you want to send a pull request for it ?

If that helps I probably can. Whatever works best for you.