aboutsummaryrefslogtreecommitdiff
path: root/connector
diff options
context:
space:
mode:
Diffstat (limited to 'connector')
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java8
-rw-r--r--connector/src/main/resources/specific_eIDAS_connector.beans.xml3
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java7
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/controller/ProcessEngineSignalControllerTest.java2
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/utils/AuthenticationDataBuilderTest.java4
-rw-r--r--connector/src/test/resources/spring/SpringTest_connector.beans.xml3
6 files changed, 19 insertions, 8 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java
index 073f7513..55ce044d 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java
@@ -92,14 +92,12 @@ public class StatusMessageProvider implements IStatusMessenger {
@Override
public String getResponseErrorCode(Throwable throwable) {
- String errorCode = IStatusMessenger.CODES_EXTERNAL_ERROR_GENERIC;
if (throwable instanceof EaafException) {
- errorCode = mapInternalErrorToExternalError(((EaafException) throwable).getErrorId());
-
+ return ((EaafException) throwable).getErrorId();
+
}
- // TODO: maybe more internal switches are required
- return errorCode;
+ return IStatusMessenger.CODES_INTERNAL_ERROR_GENERIC;
}
diff --git a/connector/src/main/resources/specific_eIDAS_connector.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.beans.xml
index c59496b4..4608086e 100644
--- a/connector/src/main/resources/specific_eIDAS_connector.beans.xml
+++ b/connector/src/main/resources/specific_eIDAS_connector.beans.xml
@@ -24,6 +24,9 @@
<property name="pvpIdpCredentials" ref="PVPEndPointCredentialProvider" />
</bean>
+ <bean id="defaultErrorTicketService"
+ class="at.gv.egiz.eaaf.core.impl.idp.auth.services.DefaultErrorService"/>
+
<bean id="eidasNodeMetadata"
class="at.asitplus.eidas.specific.connector.health.EidasNodeMetadataHealthIndicator" />
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
index b4f39985..61312c3e 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
@@ -57,6 +57,7 @@ import at.asitplus.eidas.specific.connector.controller.ProcessEngineSignalContro
import at.asitplus.eidas.specific.connector.controller.Pvp2SProfileEndpoint;
import at.asitplus.eidas.specific.connector.provider.PvpEndPointCredentialProvider;
import at.asitplus.eidas.specific.connector.provider.PvpMetadataProvider;
+import at.asitplus.eidas.specific.connector.provider.StatusMessageProvider;
import at.asitplus.eidas.specific.connector.test.saml2.Pvp2SProfileEndPointTest;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.EidasSignalServlet;
@@ -74,9 +75,11 @@ import at.gv.bmi.namespace.zmr_su.zmr._20040201.Personendaten;
import at.gv.bmi.namespace.zmr_su.zmr._20040201.PersonensuchergebnisType;
import at.gv.e_government.reference.namespace.persondata.de._20040201.IdentificationType;
import at.gv.egiz.components.spring.api.SpringBootApplicationContextInitializer;
+import at.gv.egiz.eaaf.core.api.IStatusMessenger;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
import at.gv.egiz.eaaf.core.impl.idp.controller.ProtocolFinalizationController;
+import at.gv.egiz.eaaf.core.impl.logging.LogMessageProviderFactory;
import at.gv.egiz.eaaf.core.impl.utils.DomUtils;
import at.gv.egiz.eaaf.core.impl.utils.Random;
import at.gv.egiz.eaaf.modules.pvp2.exception.CredentialsNotAvailableException;
@@ -125,6 +128,8 @@ public class FullStartUpAndProcessTest {
@Autowired private EidasSignalServlet eidasSignal;
@Autowired private ProtocolFinalizationController finalize;
+ @Autowired private IStatusMessenger messager;
+
@Rule
public final SoapServiceRule soap = SoapServiceRule.newInstance();
@@ -199,6 +204,8 @@ public class FullStartUpAndProcessTest {
}
}
+ LogMessageProviderFactory.setStatusMessager(messager);
+
szrMock = soap.mock(SZR.class, "http://localhost:1234/demoszr");
zmrClient = soap.mock(ServicePort.class, "http://localhost:1234/demozmr");
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/controller/ProcessEngineSignalControllerTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/controller/ProcessEngineSignalControllerTest.java
index 546d2824..5b612036 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/controller/ProcessEngineSignalControllerTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/controller/ProcessEngineSignalControllerTest.java
@@ -69,7 +69,7 @@ public class ProcessEngineSignalControllerTest {
Assert.assertEquals("http StatusCode", 302, httpResp.getStatus());
Assert.assertNotNull("redirect header", httpResp.getHeaderValue("Location"));
Assert.assertTrue("wrong redirect header",
- httpResp.getHeader("Location").startsWith("http://localhost//public/secure/errorHandling?errorid="));
+ httpResp.getHeader("Location").startsWith("http://localhost/public/secure/errorHandling?errorid="));
}
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/utils/AuthenticationDataBuilderTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/utils/AuthenticationDataBuilderTest.java
index 5f1c5dcf..f4b8e57c 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/utils/AuthenticationDataBuilderTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/utils/AuthenticationDataBuilderTest.java
@@ -42,7 +42,7 @@ import at.gv.egiz.eaaf.core.exceptions.EaafAuthenticationException;
import at.gv.egiz.eaaf.core.exceptions.EaafBuilderException;
import at.gv.egiz.eaaf.core.exceptions.EaafParserException;
import at.gv.egiz.eaaf.core.exceptions.EaafStorageException;
-import at.gv.egiz.eaaf.core.impl.idp.auth.builder.BpkBuilder;
+import at.gv.egiz.eaaf.core.impl.builder.BpkBuilder;
import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper;
import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser;
import at.gv.egiz.eaaf.core.impl.idp.module.test.DummySpConfiguration;
@@ -185,7 +185,7 @@ public class AuthenticationDataBuilderTest {
Assert.assertEquals("FamilyName", idl.getFamilyName(), authData.getFamilyName());
Assert.assertEquals("GivenName", idl.getGivenName(), authData.getGivenName());
- Assert.assertEquals("DateOfBirth", idl.getDateOfBirth(), authData.getFormatedDateOfBirth());
+ Assert.assertEquals("DateOfBirth", idl.getDateOfBirth(), authData.getDateOfBirth());
Assert.assertEquals("bPK",
BpkBuilder.generateAreaSpecificPersonIdentifier(
idl.getIdentificationValue(), EaafConstants.URN_PREFIX_CDID + "XX").getFirst(),
diff --git a/connector/src/test/resources/spring/SpringTest_connector.beans.xml b/connector/src/test/resources/spring/SpringTest_connector.beans.xml
index 5819a915..ac5455d3 100644
--- a/connector/src/test/resources/spring/SpringTest_connector.beans.xml
+++ b/connector/src/test/resources/spring/SpringTest_connector.beans.xml
@@ -15,6 +15,9 @@
<mvc:annotation-driven />
<mvc:default-servlet-handler />
+ <bean id="defaultErrorTicketService"
+ class="at.gv.egiz.eaaf.core.impl.idp.auth.services.DefaultErrorService"/>
+
<bean id="WebResourceConfiguration"
class="at.asitplus.eidas.specific.connector.config.StaticResourceConfiguration" />