-
Notifications
You must be signed in to change notification settings - Fork 3
fix: correct token TTL from 30 days to documented 24 hours #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,8 +85,8 @@ pub enum ConnectionEvent { | |
| }, | ||
| } | ||
|
|
||
| /// Token age threshold for refresh (14 days). | ||
| pub const TOKEN_REFRESH_AGE_SECS: i64 = 14 * 24 * 3600; | ||
| /// Token age threshold for refresh (20 hours — must be shorter than the 24h server TTL). | ||
| pub const TOKEN_REFRESH_AGE_SECS: i64 = 20 * 3600; | ||
|
Comment on lines
+88
to
+89
|
||
|
|
||
| #[cfg(test)] | ||
| mod tests { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOKEN_REFRESH_AGE_SECSis now hard-coded relative to the server TTL (“must be shorter than the 24h server TTL”), but the client already receivesexpires_infrom/v1/pairand/v1/refresh(currently ignored). Consider basing refresh scheduling on the server-providedexpires_in(minus a safety margin) to avoid future drift between client and server TTLs.