Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KowalczykBartek committed Oct 23, 2024
1 parent e37eaf1 commit 0c44809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ impl OAuth2Extension
}

let token_is_valid_for_ms : u128 = grace_period_seconds as u128 * 1000;
//we are multiplying by 1000 becuase expires_in field is in seconds, grace_period also,
//but later we oparate on miliseconds.
//we are multiplying by 1000 because expires_in field is in seconds, grace_period also,
//but later we operate on milliseconds.
let now = SystemTime::now();
let since_the_epoch = now.duration_since(UNIX_EPOCH).unwrap();
let token_will_expire_after_ms = since_the_epoch.as_millis() + (token_is_valid_for_ms as u128);
Expand Down

0 comments on commit 0c44809

Please sign in to comment.