summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-03 17:14:38 +0200
committerSimon Rettberg2015-08-03 17:14:38 +0200
commitf26ce0114ff3506b4a94ec73a75f1d47c33ed52b (patch)
tree9733e1286a1e4ac71d82fb7edbe53d549c23ff4e /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
parentMerge branch 'v1.1' of git.openslx.org:openslx-ng/tutor-module into v1.1 (diff)
downloadtutor-module-f26ce0114ff3506b4a94ec73a75f1d47c33ed52b.tar.gz
tutor-module-f26ce0114ff3506b4a94ec73a75f1d47c33ed52b.tar.xz
tutor-module-f26ce0114ff3506b4a94ec73a75f1d47c33ed52b.zip
[client] Remove debug output from LoginWindow
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java42
1 files changed, 19 insertions, 23 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
index 0df9cb04..594eba07 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java
@@ -81,11 +81,11 @@ public class LoginWindow extends LoginWindowLayout {
idpLabel.setVisible(type == LOGIN_TYPE.ECP);
idpCombo.setVisible(type == LOGIN_TYPE.ECP);
loginType = type;
- }
+ }
}
});
}
-
+
// check if we had saved an authentication method
String savedAuthMethod = Config.getAuthenticationMethod();
LOGIN_TYPE savedLoginType;
@@ -95,7 +95,7 @@ public class LoginWindow extends LoginWindowLayout {
// if no valid LOGIN_TYPE was saved, just enable the BWIDM button
savedLoginType = LOGIN_TYPE.ECP;
}
-
+
if (savedLoginType == LOGIN_TYPE.ECP) {
// disable login button til the idp list is here
loginButton.setEnabled(false);
@@ -114,7 +114,7 @@ public class LoginWindow extends LoginWindowLayout {
App.waitForInit();
orgs = OrganizationCache.getAll();
} catch (Exception e) {
- LoginWindow.LOGGER.error("Error during execution: ", e);
+ LOGGER.error("Error during execution: ", e);
}
// filter out every organisation without ecp
Iterator<Organization> iterator = orgs.iterator();
@@ -140,7 +140,7 @@ public class LoginWindow extends LoginWindowLayout {
});
}
});
-
+
loginButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -156,7 +156,7 @@ public class LoginWindow extends LoginWindowLayout {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
doLogin();
}
-
+
}
});
@@ -174,25 +174,22 @@ public class LoginWindow extends LoginWindowLayout {
/**
* Called by the thread fetching the organization list from the cache
*
- * @param orgs list of organization to show in the combo box
+ * @param orgs list of organization to show in the combo box
*/
public void populateIdpCombo(List<Organization> orgs) {
-
+
// sanity checks on orgs
if (orgs == null) {
LOGGER.error("No organizations received from the cache.");
return;
}
- for (Organization org : orgs) { LOGGER.debug(org); }
idpCombo.setModel(new DefaultComboBoxModel<Organization>(orgs.toArray(new Organization[orgs.size()])));
idpCombo.setRenderer(new DefaultListCellRenderer() {
@Override
- public Component getListCellRendererComponent(JList<?> list,
- Object value, int index, boolean isSelected,
- boolean cellHasFocus) {
- super.getListCellRendererComponent(list, value, index,
- isSelected, cellHasFocus);
+ public Component getListCellRendererComponent(JList<?> list, Object value, int index,
+ boolean isSelected, boolean cellHasFocus) {
+ super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof Organization) {
Organization org = (Organization) value;
setText(org.getDisplayName());
@@ -276,8 +273,8 @@ public class LoginWindow extends LoginWindowLayout {
case SERVICE_PROVIDER_ERROR:
// here if we have t != null then we have not received a token
// if we have t, then the token is invalid.
- Gui.showMessageBox(me, "Invalid token from the service provider!",
- MessageType.ERROR, LOGGER, t);
+ Gui.showMessageBox(me, "Invalid token from the service provider!", MessageType.ERROR,
+ LOGGER, t);
break;
case UNREGISTERED_ERROR:
Gui.showMessageBox(me, "You are not registered to bwLehrpool. Please visit "
@@ -285,8 +282,8 @@ public class LoginWindow extends LoginWindowLayout {
LOGGER, t);
break;
case INVALID_URL_ERROR:
- Gui.showMessageBox(me, "ECP Authenticator says: Invalid URL.",
- MessageType.ERROR, LOGGER, t);
+ Gui.showMessageBox(me, "ECP Authenticator says: Invalid URL.", MessageType.ERROR, LOGGER,
+ t);
break;
case GENERIC_ERROR:
default:
@@ -317,8 +314,7 @@ public class LoginWindow extends LoginWindowLayout {
try {
authenticator.login(username, password, authenticatorCallback);
} catch (Exception e) {
- Gui.showMessageBox(this, "Authentication failed: " + e.getMessage(), MessageType.ERROR,
- LOGGER, e);
+ Gui.showMessageBox(this, "Authentication failed: " + e.getMessage(), MessageType.ERROR, LOGGER, e);
return;
}
}
@@ -337,8 +333,8 @@ public class LoginWindow extends LoginWindowLayout {
try {
ThriftManager.getSatClient().isAuthenticated(Session.getSatelliteToken());
// now read the config to see if the user already agreed to the disclaimer
-// if (DisclaimerWindow.shouldBeShown())
-// VirtualizerNoticeWindow.open();
+ // if (DisclaimerWindow.shouldBeShown())
+ // VirtualizerNoticeWindow.open();
LOGGER.debug("Closing...");
dispose();
return;
@@ -353,7 +349,7 @@ public class LoginWindow extends LoginWindowLayout {
* Opens the login window
*/
public static void open(Frame modalParent) {
-
+
LoginWindow win = new LoginWindow(modalParent);
MainWindow.centerShell(win);
win.setVisible(true);