diff options
Diffstat (limited to 'connector/src/main')
-rw-r--r-- | connector/src/main/java/at/asitplus/eidas/specific/connector/builder/AuthenticationDataBuilder.java | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/builder/AuthenticationDataBuilder.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/builder/AuthenticationDataBuilder.java index 629d015e..05704de9 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/builder/AuthenticationDataBuilder.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/builder/AuthenticationDataBuilder.java @@ -46,7 +46,6 @@ import at.gv.egiz.eaaf.core.exceptions.EaafAuthenticationException; import at.gv.egiz.eaaf.core.exceptions.EaafBuilderException; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.exceptions.EaafStorageException; -import at.gv.egiz.eaaf.core.impl.builder.BpkBuilder; import at.gv.egiz.eaaf.core.impl.data.Pair; import at.gv.egiz.eaaf.core.impl.data.Triple; import at.gv.egiz.eaaf.core.impl.idp.AuthenticationData; @@ -223,17 +222,21 @@ public class AuthenticationDataBuilder extends AbstractAuthenticationDataBuilder final String sourcePinType = authProcessData.getGenericDataFromSession( PvpAttributeDefinitions.MANDATE_LEG_PER_SOURCE_PIN_TYPE_NAME, String.class); - // TODO: check if we should to this in such a way! - final Pair<String, String> leagalPersonIdentifier = - BpkBuilder.generateAreaSpecificPersonIdentifier( - sourcePinType + sourcePin, - sourcePinType, - pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier()); - + // build leagl-person identifier for eIDAS out-going + final String[] splittedTarget = + pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier().split("\\+"); + StringBuilder sb = new StringBuilder(); + sb.append(splittedTarget[1]) + .append("/") + .append(splittedTarget[2]) + .append("/") + .append(sourcePinType) + .append("+") + .append(sourcePin); + log.debug("Use legal-person eIDAS identifer: {} from baseId: {} and baseIdType: {}", - leagalPersonIdentifier.getFirst(), sourcePin, sourcePinType); - authData.setGenericData(MsProxyServiceConstants.ATTR_EIDAS_JUR_MANDATOR_PERSONAL_IDENTIFIER, - leagalPersonIdentifier.getFirst()); + sb.toString(), sourcePin, sourcePinType); + authData.setGenericData(MsProxyServiceConstants.ATTR_EIDAS_JUR_MANDATOR_PERSONAL_IDENTIFIER, sb.toString()); } } |