aboutsummaryrefslogtreecommitdiff
path: root/connector/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2021-01-11 15:15:03 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2021-01-11 15:15:03 +0100
commita5d2e6d6fa2c75ae8211c818537524e8c54c3129 (patch)
tree38444e5b15cfb1705f87b150aec200976bc22ee5 /connector/src/main/java
parent1bcc269ff8f16b2a4dee4f393e4259f4768ca3a0 (diff)
downloadNational_eIDAS_Gateway-a5d2e6d6fa2c75ae8211c818537524e8c54c3129.tar.gz
National_eIDAS_Gateway-a5d2e6d6fa2c75ae8211c818537524e8c54c3129.tar.bz2
National_eIDAS_Gateway-a5d2e6d6fa2c75ae8211c818537524e8c54c3129.zip
fix some minor incompatibilities between AuthHandler and MS-Connector in E-ID mode
Diffstat (limited to 'connector/src/main/java')
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/attributes/AuthBlockAttributeBuilder.java6
1 files changed, 5 insertions, 1 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);