aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java19
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java2
3 files changed, 17 insertions, 8 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index a68dca65a..b8fa4f412 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -501,16 +501,19 @@ public class AuthenticationServer implements MOAIDAuthConstants {
// check if an identity link was found
// Errorcode 2911 von Trustdesk BKU (nicht spezifikationskonform (SL1.2))
- CharSequence se = "ErrorCode>2911".substring(0);
- boolean b = xmlInfoboxReadResponse.contains(se);
- if (b) { // no identity link found
+ //CharSequence se = "ErrorCode>2911".substring(0);
+ //boolean b = xmlInfoboxReadResponse.contains(se);
+ String se = "ErrorCode>2911";
+ int b = xmlInfoboxReadResponse.indexOf(se);
+ if (b!=-1) { // no identity link found
Logger.info("Es konnte keine Personenbindung auf der Karte gefunden werden. Versuche Anmeldung als ausländische eID.");
return null;
}
// spezifikationsgemäßer (SL1.2) Errorcode
se = "ErrorCode>4002";
- b = xmlInfoboxReadResponse.contains(se);
- if (b) { // Unbekannter Infoboxbezeichner
+ //b = xmlInfoboxReadResponse.contains(se);
+ b = xmlInfoboxReadResponse.indexOf(se);
+ if (b!=-1) { // Unbekannter Infoboxbezeichner
Logger.info("Unbekannter Infoboxbezeichner. Versuche Anmeldung als ausländische eID.");
return null;
}
@@ -1659,6 +1662,12 @@ public class AuthenticationServer implements MOAIDAuthConstants {
Element mandatePerson = tempIdentityLink.getPrPerson();
+ try {
+ System.out.println("MANDATE: " + DOMUtils.serializeNode(mandatePerson));
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ }
String mandateData = null;
try {
OAAuthParameter oaParam =
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java
index 2e20f483c..cb3ed5ad9 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java
@@ -251,8 +251,8 @@ public class IdentityLinkAssertionParser {
String familyname = XPathUtils.getElementValue(assertionElem, PERSON_FAMILY_NAME_XPATH, "");
// replace ' in name with '
- givenname = givenname.replace("'", "'");
- familyname = familyname.replace("'", "'");
+ givenname = givenname.replaceAll("'", "'");
+ familyname = familyname.replaceAll("'", "'");
identityLink.setGivenName(givenname);
identityLink.setFamilyName(familyname);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java
index 49105b306..dfad29e50 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java
@@ -97,7 +97,7 @@ public class CreateXMLSignatureResponseValidator {
throw new ValidateException("validator.32", null);
}
// replace ' in name with '
- issuer = issuer.replace("'", "'");
+ issuer = issuer.replaceAll("'", "'");
String issueInstant = samlAssertion.getAttribute("IssueInstant");
if (!issueInstant.equals(session.getIssueInstant())) {