Force expire tokens if requested

This commit is contained in:
M66B 2021-07-17 12:42:35 +02:00
parent e49321af2c
commit 8ce7279076
1 changed files with 2 additions and 0 deletions

View File

@ -102,6 +102,8 @@ public class ServiceAuthenticator extends Authenticator {
return authState.getAccessToken();
} else if (auth == AUTH_TYPE_OAUTH) {
AuthState authState = AuthState.jsonDeserialize(password);
if (expire)
authState.setNeedsTokenRefresh(true);
OAuthRefresh(context, provider, authState);
Long expiration = authState.getAccessTokenExpirationTime();
if (expiration != null)