Closed kometen closed 1 year ago
There is a default 60s leeway that you can customise
Thank you.
let mut validation = Validation::new(Algorithm::HS256);
validation.leeway = 5;
let token_data = match decode::<Claims>(
&token,
&DecodingKey::from_secret(key),
&validation,
) { ... }
Found this introduction at https://tms-dev-blog.com/how-to-use-jwt-with-rust-learn-the-basics/ which I tried. But it does not seem to result in a panic when pausing and then decode beyond exp.