Skip to content

Commit 38f8a7b

Browse files
authoredJan 27, 2025··
Merge pull request #79 from Blobscan/fix/jwt-token-expiration
fix: resolve JWT expiration token validation
2 parents ee21928 + 2c85fbc commit 38f8a7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/clients/blobscan/jwt_manager.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ impl JWTManager {
4747

4848
match *token_guard {
4949
Some(ref token) => {
50-
let now = Utc::now() - self.safety_margin;
50+
let now = Utc::now() + self.safety_margin;
5151
let expiration_date = expr_guard.ok_or(anyhow::anyhow!(
5252
"JWT expiration date not set. This should not happen"
5353
))?;
5454

55-
if now > expiration_date {
55+
if now >= expiration_date {
5656
debug!(
5757
expiration_date = expiration_date.to_string(),
5858
"JWT expired. Refreshing token"

0 commit comments

Comments
 (0)
Please sign in to comment.