mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-03 09:55:05 +01:00
imp(expiry): Treat tokens with < 1 minute life left as expired.
Fixes #78.
This commit is contained in:
@@ -216,7 +216,7 @@ impl Token {
|
||||
if self.access_token.len() == 0 {
|
||||
panic!("called expired() on unset token");
|
||||
}
|
||||
self.expiry_date() <= Utc::now()
|
||||
self.expiry_date() - chrono::Duration::minutes(1) <= Utc::now()
|
||||
}
|
||||
|
||||
/// Returns a DateTime object representing our expiry date.
|
||||
|
||||
Reference in New Issue
Block a user