-
Notifications
You must be signed in to change notification settings - Fork 1
Add documentation on sessions. #54
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
base: master
Are you sure you want to change the base?
Conversation
| 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. |
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.
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. |
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.
| 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. |
?
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.
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. |
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.
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>
Add doc with the processes and new rules.