Fix set_expires_in not accepting non-default Period (#402)

This commit is contained in:
Ilya Andreev
2025-12-29 16:08:15 +03:00
committed by GitHub
parent 7fc762d7d6
commit b89a5b1cb5
7 changed files with 8 additions and 8 deletions

View File

@@ -90,7 +90,7 @@ TEST(OspJsoncppTest, VerifyTokenExpirationInValid) {
const auto token = jwt::create<jwt::traits::open_source_parsers_jsoncpp>()
.set_issuer("auth0")
.set_issued_now()
.set_expires_in(std::chrono::seconds{3600})
.set_expires_in(std::chrono::hours{1})
.sign(jwt::algorithm::hs256{"secret"});
const auto decoded_token = jwt::decode<jwt::traits::open_source_parsers_jsoncpp>(token);