Skip to content

Commit d536ea6

Browse files
Floris Bruynooghedjc
authored andcommitted
Document the 30s margin in expire time checking.
1 parent c63649e commit d536ea6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ impl fmt::Debug for Token {
3636

3737
impl Token {
3838
/// Define if the token has has_expired
39+
///
40+
/// This takes an additional 30s margin to ensure the token can still be reasonably used
41+
/// instead of expiring right after having checked.
3942
pub fn has_expired(&self) -> bool {
4043
self.expires_at
4144
.map(|expiration_time| {

0 commit comments

Comments
 (0)