Add documentation on sessions.#54
Open
GeoffreyHuck wants to merge 2 commits into
Open
Conversation
smadbe
approved these changes
Jun 14, 2024
Comment on lines
+58
to
+64
| 4. We get a lock for the session. | ||
| 5. We call the login-module to refresh the token, with the refresh token of the session, and get back: | ||
| - the new access token | ||
| - the new refresh token | ||
| - the expiration time of the access token | ||
| 6. We store the refresh token in the session, and store the new access token. | ||
| 7. We delete expired old tokens for the session. |
Contributor
There was a problem hiding this comment.
You get a lock but you don't say when you release it.
Getting a lock for a remote access is dangerous (if you loose request, you process is killed, ...), how do you protect against that?
|
|
||
| ### A token can only be refreshed if it's not expired | ||
|
|
||
| If an expired token is used to refresh the token, access defined error is returned. |
Contributor
There was a problem hiding this comment.
Suggested change
| If an expired token is used to refresh the token, access defined error is returned. | |
| If an expired token is used to refresh the token, access denied error is returned. |
?
Contributor
Author
There was a problem hiding this comment.
fix, it's a 401 unauthorized error
|
|
||
| 1. The first request gets the lock, and the token gets refreshed. | ||
| 2. The other requests (already made before the refresh was done), are using tokens that are not the most recent anymore. | ||
| The most recent token (just refreshed) will be sent with its expiration time. |
Contributor
There was a problem hiding this comment.
Not clear, it will not be sent to the other requests, so it is not related with (2).
Co-authored-by: Damien Leroy <smadbe@users.noreply.github.com>
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.
Add doc with the processes and new rules.