Regard token to be invalid only when remote throws ForbiddenOperationException

This commit is contained in:
yushijinhun
2018-06-30 18:52:37 +08:00
parent c4db9c9e12
commit 9fa56a9cd4

View File

@@ -84,8 +84,11 @@ public class YggdrasilService {
requireEmpty(request(provider.getValidationURL(), createRequestWithCredentials(accessToken, clientToken)));
return true;
} catch (RemoteAuthenticationException e) {
if ("ForbiddenOperationException".equals(e.getRemoteName())) {
return false;
}
throw e;
}
}
public void invalidate(String accessToken) throws AuthenticationException {