authenticators, username, password);
task.execute();
authenticated = task.get();
} catch (ExecutionException e) {
throw new AuthenticationError(e.getLocalizedMessage());
} catch (InterruptedException e) {
// Nothing to do.
} finally {
Mediator.getUI().setCursor(null);
}
if (!authenticated) {
retries--;
}
}
}
Mediator.getUI().getStatusPane().setMessage("");
if (cancelled) {
throw new CancellationException();
}
if (!authenticated) {
throw new AuthenticationError("Unable to authenticate.");
}
}