private boolean login(CallbackResult callback) {
if (NonInteractiveMode.on()) {
callback.failed(new Exception("Cannot launch the login dialog in non-interactive mode."));
return false;
} else {
LoginRequest request = loginHandler.loginRequested(callback);
return request.isGranted();
}
}