From 0224cdf7be78cf0778f0b832a42c18c480c4b784 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 9 Dec 2019 09:22:54 +0100 Subject: switch to EAAF-Components 1.1.0-SNAPSHOT --- .../tasks/CreateIdentityLinkTask.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java index 3f27ca64..26dab045 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java @@ -56,19 +56,19 @@ import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.utils.eIDASResponse import at.gv.e_government.reference.namespace.persondata._20020228.AlternativeNameType; import at.gv.e_government.reference.namespace.persondata._20020228.PersonNameType; import at.gv.e_government.reference.namespace.persondata._20020228.PhysicalPersonType; -import at.gv.egiz.eaaf.core.api.data.EAAFConstants; -import at.gv.egiz.eaaf.core.api.data.PVPAttributeDefinitions; +import at.gv.egiz.eaaf.core.api.data.EaafConstants; +import at.gv.egiz.eaaf.core.api.data.PvpAttributeDefinitions; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; -import at.gv.egiz.eaaf.core.exceptions.EAAFException; +import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; import at.gv.egiz.eaaf.core.impl.data.Pair; -import at.gv.egiz.eaaf.core.impl.idp.auth.builder.BPKBuilder; +import at.gv.egiz.eaaf.core.impl.idp.auth.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.auth.modules.AbstractAuthServletTask; -import at.gv.egiz.eaaf.core.impl.utils.DOMUtils; +import at.gv.egiz.eaaf.core.impl.utils.DomUtils; import at.gv.egiz.eaaf.core.impl.utils.XPathUtils; import eu.eidas.auth.commons.attribute.AttributeDefinition; import eu.eidas.auth.commons.attribute.AttributeValue; @@ -120,7 +120,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { // create fake IdL // - fetch IdL template from resources InputStream s = CreateIdentityLinkTask.class.getResourceAsStream("/resources/xmldata/fakeIdL_IdL_template.xml"); - Element idlTemplate = DOMUtils.parseXmlValidating(s); + Element idlTemplate = DomUtils.parseXmlValidating(s); identityLink = new SimpleIdentityLinkAssertionParser(idlTemplate).parseIdentityLink(); @@ -151,7 +151,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { identityLink = new SimpleIdentityLinkAssertionParser(idlassertion).parseIdentityLink(); - Pair bPKCalc = new BPKBuilder().generateAreaSpecificPersonIdentifier( + Pair bPKCalc = new BpkBuilder().generateAreaSpecificPersonIdentifier( identityLink.getIdentificationValue(), identityLink.getIdentificationType(), pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier()); @@ -237,7 +237,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { } else { log.debug("Calculating bPK from baseId ... "); - Pair bPKCalc = new BPKBuilder().generateAreaSpecificPersonIdentifier( + Pair bPKCalc = new BpkBuilder().generateAreaSpecificPersonIdentifier( identityLink.getIdentificationValue(), identityLink.getIdentificationType(), pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier()); @@ -268,18 +268,18 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { authProcessData.setForeigner(true); authProcessData.setIdentityLink(identityLink); authProcessData.setGenericDataToSession( - PVPAttributeDefinitions.EID_ISSUING_NATION_NAME, + PvpAttributeDefinitions.EID_ISSUING_NATION_NAME, eIDASResponseUtils.parseEidasPersonalIdentifier((String) simpleAttrMap.get(Constants.eIDAS_ATTR_PERSONALIDENTIFIER)).getFirst()); //set bPK and bPKType into auth session authProcessData.setGenericDataToSession( - PVPAttributeDefinitions.BPK_NAME, + PvpAttributeDefinitions.BPK_NAME, extendBPKbyPrefix( bPK, pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier()) ); authProcessData.setGenericDataToSession( - PVPAttributeDefinitions.EID_SECTOR_FOR_IDENTIFIER_NAME, + PvpAttributeDefinitions.EID_SECTOR_FOR_IDENTIFIER_NAME, pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier()); @@ -290,7 +290,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { } catch (eIDASAttributeException e) { throw new TaskExecutionException(pendingReq, "Minimum required eIDAS attributeset not found.", e); - } catch (EAAFException e) { + } catch (EaafException e) { throw new TaskExecutionException(pendingReq, "IdentityLink generation for foreign person FAILED.", e); } catch (Exception e) { @@ -303,14 +303,14 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { private String extendBPKbyPrefix(String bpk, String type) { String bPKType = null; - if (type.startsWith(EAAFConstants.URN_PREFIX_WBPK)) - bPKType = type.substring((EAAFConstants.URN_PREFIX_WBPK).length()); + if (type.startsWith(EaafConstants.URN_PREFIX_WBPK)) + bPKType = type.substring((EaafConstants.URN_PREFIX_WBPK).length()); - else if (type.startsWith(EAAFConstants.URN_PREFIX_CDID)) - bPKType = type.substring((EAAFConstants.URN_PREFIX_CDID).length()); + else if (type.startsWith(EaafConstants.URN_PREFIX_CDID)) + bPKType = type.substring((EaafConstants.URN_PREFIX_CDID).length()); - else if (type.startsWith(EAAFConstants.URN_PREFIX_EIDAS)) - bPKType = type.substring((EAAFConstants.URN_PREFIX_EIDAS).length()); + else if (type.startsWith(EaafConstants.URN_PREFIX_EIDAS)) + bPKType = type.substring((EaafConstants.URN_PREFIX_EIDAS).length()); if (bPKType != null ) { -- cgit v1.2.3