Cura/cura/OAuth2
Ghostkeeper 3f92b46ac8
Don't restart refresh token while it's already processing
If two requests to the API occur at the same time, they will both see at the same time that they need an access token, and if it is expired they will both see that it needs refreshing. The server then sees two refreshes, both with the same refresh token. This is not allowed. The second one then gets a failure to refresh the token, which causes the user to log out.
Instead, we'll stop one of the refresh requests. They were fire-and-forget anyway, so it's not needed to actually continue the request.

Contributes to issue CURA-8539.
2021-11-22 18:52:43 +01:00
..
__init__.py Fix code style and documentation formatting 2019-02-08 11:10:43 +01:00
AuthorizationHelpers.py Only call success_callback if it's not None 2021-11-22 16:20:37 +01:00
AuthorizationRequestHandler.py Make getAuthenticationTokenUsingXYZ asynchronous 2021-11-19 16:55:45 +01:00
AuthorizationRequestServer.py Fix Authorization server not properly stopping after flow completes. 2020-06-09 15:12:26 +02:00
AuthorizationService.py Don't restart refresh token while it's already processing 2021-11-22 18:52:43 +01:00
KeyringAttribute.py Make this run from source again on Windows. 2021-09-01 16:56:47 +02:00
LocalAuthorizationServer.py Add extra logging to auth server 2021-07-23 10:40:30 +02:00
Models.py Small aesthetic code changes 2021-03-17 09:30:31 +01:00