aboutsummaryrefslogtreecommitdiff
path: root/connector/src
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src')
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java6
-rw-r--r--connector/src/main/resources/application.properties2
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/attributes/AuthBlockAttributeBuilderTest.java5
3 files changed, 11 insertions, 2 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java
index be9f8862..1833f377 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java
@@ -22,6 +22,9 @@ package at.asitplus.eidas.specific.connector.attributes;
import static at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions.EID_AUTHBLOCK_SIGNED_FRIENDLY_NAME;
import static at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions.EID_AUTHBLOCK_SIGNED_NAME;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
import org.apache.commons.lang3.StringUtils;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
@@ -48,7 +51,8 @@ public class AuthBlockAttributeBuilder implements IPvpAttributeBuilder {
String authBlock = authData.getGenericData(Constants.SZR_AUTHBLOCK, String.class);
if (StringUtils.isNotEmpty(authBlock)) {
- return g.buildStringAttribute(EID_AUTHBLOCK_SIGNED_FRIENDLY_NAME, EID_AUTHBLOCK_SIGNED_NAME, authBlock);
+ return g.buildStringAttribute(EID_AUTHBLOCK_SIGNED_FRIENDLY_NAME, EID_AUTHBLOCK_SIGNED_NAME,
+ Base64.getEncoder().encodeToString(authBlock.getBytes(StandardCharsets.UTF_8)));
} else {
throw new UnavailableAttributeException(EID_AUTHBLOCK_SIGNED_NAME);
diff --git a/connector/src/main/resources/application.properties b/connector/src/main/resources/application.properties
index ef83d435..b13b6c18 100644
--- a/connector/src/main/resources/application.properties
+++ b/connector/src/main/resources/application.properties
@@ -70,6 +70,7 @@ eidas.ms.auth.eIDAS.szrclient.timeout.response=30
eidas.ms.auth.eIDAS.szrclient.params.vkz=
eidas.ms.auth.eIDAS.szrclient.params.useSZRForbPKCalculation=false
+eidas.ms.auth.eIDAS.szrclient.eidasbind.mds.inject=false
# tech. AuthBlock signing for E-ID process
@@ -84,6 +85,7 @@ eidas.ms.auth.eIDAS.szrclient.params.useSZRForbPKCalculation=false
#Raw eIDAS Id data storage
eidas.ms.auth.eIDAS.szrclient.workarounds.eidmapping.revisionlog.active=true
+
eidas.ms.auth.eIDAS.szrclient.params.setPlaceOfBirthIfAvailable=true
eidas.ms.auth.eIDAS.szrclient.params.setBirthNameIfAvailable=true
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/attributes/AuthBlockAttributeBuilderTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/attributes/AuthBlockAttributeBuilderTest.java
index f6d22c98..5c0a1420 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/attributes/AuthBlockAttributeBuilderTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/attributes/AuthBlockAttributeBuilderTest.java
@@ -2,6 +2,8 @@ package at.asitplus.eidas.specific.connector.test.attributes;
import static at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions.EID_AUTHBLOCK_SIGNED_NAME;
+import java.util.Base64;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
@@ -64,7 +66,8 @@ public class AuthBlockAttributeBuilderTest extends AbstractAttributeBuilderTest
final String value = attrBuilde.build(spConfig, authData, gen);
- Assert.assertEquals("Authblock build wrong", JSW, value);
+ Assert.assertNotNull("AuthBlock", value);
+ Assert.assertEquals("Authblock build wrong", JSW, new String(Base64.getDecoder().decode(value)));
} catch (final Exception e) {
Assert.assertNull("Attr. builder has an exception", e);