summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java1
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java30
2 files changed, 2 insertions, 29 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java
index 071b92ad..1c6062b6 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/authentication/ShibbolethEcp.java
@@ -132,6 +132,7 @@ public class ShibbolethEcp {
// now init the authenticator for that idp and our static sp
final ECPAuthenticator auth = new ECPAuthenticator(ProxyConfigurator.getClient(), user, pass, new URI(idpUrl), BWLP_SP);
+ auth.setRetryWithoutAt(true);
HttpResponse spResponse;
try {
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 87524764..8f5dc68a 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
@@ -200,7 +200,7 @@ public class LoginWindow extends LoginWindowLayout {
txtUsername.getDocument().addDocumentListener(new TextChangeListener() {
@Override
public void changed() {
- if (cboOrganization.getSelectedIndex() != -1)
+ if (cboOrganization.getSelectedIndex() != -1 || loginType != LoginType.ECP)
return;
String name = txtUsername.getText();
int at = name.indexOf('@');
@@ -303,34 +303,6 @@ public class LoginWindow extends LoginWindowLayout {
// determine which organization was selected by the user.
Organization selectedOrg = cboOrganization.getItemAt(cboOrganization.getSelectedIndex());
- // now lets check if the username contains an organization
- // for this we just check if the given username contains a '@'
- // if it does, we just strip everything after and including '@'
- if (loginType == LoginType.ECP && username.contains("@")) {
- // split only on first occurence of '@'
- String[] usernameSplit = username.split("@", 2);
- if (!usernameSplit[1].isEmpty()) {
- Organization orgInUsername = OrganizationCache.find(usernameSplit[1]);
- if (orgInUsername != null) {
- // username contains a known organization
- if (!selectedOrg.equals(orgInUsername)) {
- // but it does not match the one selected in the combobox
- boolean ret = Gui.showMessageBox(
- this,
- "Der angegebene Benutzername enthält eine Organisation, die nicht mit Ihrer IDP-Auswahl übereinstimmt."
- + "\nWollen Sie die in Ihrem Benutzername gefundene Organisation verwenden?",
- MessageType.QUESTION_YESNO, null, null);
- if (ret) {
- cboOrganization.setSelectedItem(orgInUsername);
- selectedOrg = orgInUsername;
- }
- }
- // always set the username to everything before '@'
- txtUsername.setText(usernameSplit[0]);
- username = usernameSplit[0];
- }
- }
- }
// we are doing the login soon, first save the config
doSaveConfig();