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

Fix as_date()'s std::bad_cast with decimal value #240

Closed Prosperoh closed 2 years ago

Prosperoh commented 2 years ago

If the timestamp value for the date is a decimal number, round it to the closest integer. This allows date claims to have a decimal value, though it will be rounded up to the closest second.