use strtoul for conversion
This commit is contained in:
parent
88d50ec9ca
commit
96fa6149a8
|
@ -43,7 +43,11 @@ std::pair <std::string, unsigned int> verifyToken(std::string jwt_token_str, std
|
|||
}
|
||||
|
||||
if (decoded.has_payload_claim("iat")) {
|
||||
token_issued_at = (unsigned int) (decoded.get_payload_claim("iat").as_int());
|
||||
|
||||
|
||||
std::string iat_str = decoded.get_payload_claim("iat").as_string();
|
||||
Info ("Got IAT token=%s", iat_str);
|
||||
token_issued_at = strtoul(iat_str, NULL,0 );
|
||||
}
|
||||
else {
|
||||
Error ("IAT not found in claim. This should not happen");
|
||||
|
|
Loading…
Reference in New Issue