Token renew + updated for Rust 1.83#26
Merged
ldpr merged 9 commits intorpdl-net:token-renewfrom May 14, 2025
Merged
Conversation
- Bump some crate versions for recent Rust versions. - Improve logging capability - Bump crate versions for Rust update - Finalize renew token - Add logging support
- Bump some crate versions for recent Rust versions. - Improve logging capability
ldpr
added a commit
that referenced
this pull request
May 14, 2025
* Update user.rs Backport upstream backend PR torrust#58 * Update mailer.rs Backport upstream backend PR torrust/torrust-index#58 * Token renew + updated for Rust 1.83 (#26) * remove odd bar under search box * reverting * take 2 - remove buggy white bar under search * Add click handling to magnifying glass icon on sidebar Epic * - Fix token renewal management and add configuration parameters - Bump some crate versions for recent Rust versions. - Improve logging capability - Bump crate versions for Rust update - Finalize renew token - Add logging support * - Fix token renewal management and add configuration parameters - Bump some crate versions for recent Rust versions. - Improve logging capability * Lower log level and remove unnecessary logs in user.rs --------- Co-authored-by: 63A9F0EA7BB98050796B649E85481845 <[email protected]> Co-authored-by: rakema01 <[email protected]> * Revert "Token renew + updated for Rust 1.83 (#26)" This reverts commit 4a760bb. --------- Co-authored-by: rakema01 <[email protected]> Co-authored-by: sudisk <[email protected]>
Merged
ldpr
pushed a commit
that referenced
this pull request
May 14, 2025
* Update user.rs Backport upstream backend PR torrust#58 * Update mailer.rs Backport upstream backend PR torrust/torrust-index#58 * - Fix token renewal management and add configuration parameters - Bump some crate versions for recent Rust versions. - Improve logging capability - Bump crate versions for Rust update - Finalize renew token - Add logging support * - Fix token renewal management and add configuration parameters - Bump some crate versions for recent Rust versions. - Improve logging capability * Lower log level and remove unnecessary logs in user.rs --------- Co-authored-by: rakema01 <[email protected]>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added two parameters in the auth section of the config.toml file (seconds) :
session_duration_seconds = 3600 ## The normal token duration (example : 1 h)
renewal_grace_time = 604800 ## The grace period duration for token renewal (example : 1 week)
Added/Modified API endpoints :
verify email address
verify if user token is valid
{"data": "Token is valid."}{"error": "Token expired. Please sign in again."}renew user token
will remain the same during validity period
will be renewed afterwards until grace period expires
{"error": "Token expired. Please sign in again."}Other error responses (user not found, invalid user, ...) are unchanged