mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-16 07:16:27 -04:00
Regard token to be invalid only when remote throws ForbiddenOperationException
This commit is contained in:
parent
c4db9c9e12
commit
9fa56a9cd4
@ -84,8 +84,11 @@ public class YggdrasilService {
|
|||||||
requireEmpty(request(provider.getValidationURL(), createRequestWithCredentials(accessToken, clientToken)));
|
requireEmpty(request(provider.getValidationURL(), createRequestWithCredentials(accessToken, clientToken)));
|
||||||
return true;
|
return true;
|
||||||
} catch (RemoteAuthenticationException e) {
|
} catch (RemoteAuthenticationException e) {
|
||||||
|
if ("ForbiddenOperationException".equals(e.getRemoteName())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void invalidate(String accessToken) throws AuthenticationException {
|
public void invalidate(String accessToken) throws AuthenticationException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user