@Override
public void updatePassword(CloudCredentials credentials, String newPassword) {
oauthClient.changePassword(credentials.getPassword(), newPassword);
CloudCredentials newCloudCredentials = new CloudCredentials(credentials.getEmail(), newPassword);
if (cloudCredentials.getProxyUser() != null) {
cloudCredentials = newCloudCredentials.proxyForUser(cloudCredentials.getProxyUser());
} else {
cloudCredentials = newCloudCredentials;
}
}