From 22a66cdf1b5f7916422034f3338e680202ddc31b Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 31 Oct 2014 17:35:35 +0100 Subject: phypersom --- .../egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java | 1 - 1 file changed, 1 deletion(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java index 853d17318..8fd5c41dc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java @@ -131,5 +131,4 @@ public class PhyPersonMandateContainer extends MandateContainer { public void setPhyPersMandatorIdentificationType(String phyPersMandatorIdentificationType) { this.phyPersMandatorIdentificationType = phyPersMandatorIdentificationType; } - } -- cgit v1.2.3 From b557ff02ff830682bfe1a1049cfad72e3d9a11e0 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Thu, 6 Nov 2014 15:28:31 +0100 Subject: Revert "Merge branch 'moa-2.1-Snapshot' of gitlab.iaik.tugraz.at:afitzek/moa-idspss into moa-2.1-Snapshot" This reverts commit 775e39a724baf237085280510216fbd688df6dd9, reversing changes made to 1fbff5f5a86733bc6a75c8ae901153baa0963441. --- .../egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java | 1 + 1 file changed, 1 insertion(+) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java index 2ea6cce00..ba89663ab 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java @@ -127,4 +127,5 @@ public class PhyPersonMandateContainer extends MandateContainer { public void setPhyPersMandatorIdentificationType(String phyPersMandatorIdentificationType) { this.phyPersMandatorIdentificationType = phyPersMandatorIdentificationType; } + } -- cgit v1.2.3 From 244e3e0e95af0941ac0e27ec6e619e587fdce162 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 7 Nov 2014 14:43:49 +0100 Subject: additional logging --- .../moa/id/protocols/stork2/CorporateBodyMandateContainer.java | 1 + .../at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java | 2 ++ 2 files changed, 3 insertions(+) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java index 3e16db7d2..acbf1678a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java @@ -90,6 +90,7 @@ public class CorporateBodyMandateContainer extends MandateContainer { } public void setCorpMandatorIdentificationValue(String corpMandatorIdentificationValue) { + Logger.debug("Setting corpMandatorIdentificationValue to AT/" + corpMandatorIdentificationValue); this.corpMandatorIdentificationValue = "AT/" + corpMandatorIdentificationValue; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java index e6c58b503..9207cc2dc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java @@ -54,6 +54,8 @@ public abstract class MandateContainer { public MandateContainer(String mandate) throws XPathExpressionException, MOAIDException { + Logger.debug("Received mandate content for processing: " + mandate); + xPath = XPathFactory.newInstance().newXPath(); HashMap prefMap = new HashMap() {{ put(S2Constants.MANDATE_PREFIX, S2Constants.MANDATE_NS); -- cgit v1.2.3 From b630842a4fd398efefff6257ac920a2bec40f9a0 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 7 Nov 2014 15:36:04 +0100 Subject: adjusting mandate to updated stork schema --- .../id/protocols/stork2/AttributeCollector.java | 2 +- .../moa/id/protocols/stork2/ConsentEvaluator.java | 2 +- .../protocols/stork2/MandateRetrievalRequest.java | 24 ++++++++++++---------- 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java index e3b9992aa..8322f0cea 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java @@ -45,7 +45,7 @@ import at.gv.egovernment.moa.id.storage.AssertionStorage; import at.gv.egovernment.moa.logging.Logger; import eu.stork.peps.auth.commons.*; import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.complex.attributes.AttributeStatusType; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; import eu.stork.peps.exceptions.STORKSAMLEngineException; import org.opensaml.common.impl.SecureRandomIdentifierGenerator; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java index de7d5d6dd..2c5728798 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java @@ -41,7 +41,7 @@ import eu.stork.peps.auth.commons.PEPSUtil; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.STORKAuthnResponse; import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.complex.attributes.AttributeStatusType; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; import eu.stork.peps.exceptions.STORKSAMLEngineException; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java index baa91a854..e3b926b00 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java @@ -40,7 +40,7 @@ import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.auth.commons.STORKAttrQueryResponse; import eu.stork.peps.complex.attributes.*; - +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.bind.JAXBContext; @@ -267,7 +267,7 @@ public class MandateRetrievalRequest implements IAction { mandateType.setRepresenting(representative); mandateType.setRepresented(represented); - mandateType.setMandateContent(mandateContent); + //mandateType.setMandateContent(mandateContent); // TODO Logger.debug("Complex attribute extracted: " + sourceAttribute.getName()); return mandateType; } @@ -275,7 +275,8 @@ public class MandateRetrievalRequest implements IAction { private String getLegalName(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException { RepresentationPersonType represented = getRepresented(mandateContainer, sourceAttribute); if (mandateContainer instanceof CorporateBodyMandateContainer) { - return represented.getName(); + represented.getLegalName(); + //return represented.getName(); } else if (sourceAttribute.isRequired()) { Logger.error("Cannot provide legalName for natural person."); throw new MOAIDException("stork.19", new Object[]{sourceAttribute.getName()}); @@ -487,10 +488,10 @@ public class MandateRetrievalRequest implements IAction { if (mandateContainer instanceof CorporateBodyMandateContainer) { CorporateBodyMandateContainer corporateBodyMandateContainer = (CorporateBodyMandateContainer) mandateContainer; represented.setELPIdentifier(corporateBodyMandateContainer.getCorpMandatorIdentificationValue()); - represented.setName(corporateBodyMandateContainer.getCorpMandatorFullName()); - represented.setAddress(""); - represented.setCanonicalAddress(new CanonicalAddressType()); - represented.setType(getCompanyType(corporateBodyMandateContainer.corpMandatorFullName, corporateBodyMandateContainer.corpMandatorIdentificationType, sourceAttribute)); + represented.setLegalName(corporateBodyMandateContainer.getCorpMandatorFullName()); + represented.setTextRegisteredAddress(""); + represented.setCanonicalRegisteredAddress(new CanonicalAddressType()); + represented.setLegalForm(getCompanyType(corporateBodyMandateContainer.corpMandatorFullName, corporateBodyMandateContainer.corpMandatorIdentificationType, sourceAttribute)); } else if (mandateContainer instanceof PhyPersonMandateContainer) { PhyPersonMandateContainer phyPersonMandateContainer = (PhyPersonMandateContainer) mandateContainer; represented.setEIdentifier(getRepresentedStorkeIdentifier(mandateContainer)); @@ -510,15 +511,16 @@ public class MandateRetrievalRequest implements IAction { try { XMLGregorianCalendar validFrom = DatatypeFactory.newInstance().newXMLGregorianCalendar(mandateContainer.getMandateValidFrom()); XMLGregorianCalendar validTo = DatatypeFactory.newInstance().newXMLGregorianCalendar(mandateContainer.getMandateValidTo()); - mandateContent.setValidFrom(validFrom); - mandateContent.setValidTo(validTo); + // TODO + //mandateContent.set .setValidFrom(validFrom); + //mandateContent.setValidTo(validTo); } catch (DatatypeConfigurationException dte) { Logger.error("Error converting date from mandate: " + mandateContainer.getMandateValidFrom() + ", " + mandateContainer.getMandateValidTo()); throw new MOAIDException("stork.20", new Object[]{}); } - mandateContent.setTransactionLimit(BigInteger.valueOf(0)); // TODO - mandateContent.setTransactionLimitCurrency("");// TODO + //mandateContent.setTransactionLimit(BigInteger.valueOf(0)); // TODO + //mandateContent.setTransactionLimitCurrency("");// TODO mandateContent.setIsJoint("0"); mandateContent.setIschained(false); mandateContent.setTypePower(mapPowersType(mandateContainer)); -- cgit v1.2.3 From 8a10286bb9b8916ec63bc7a3d67dad0e6bed00af Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 7 Nov 2014 15:46:44 +0100 Subject: adjusting hcp to updated stork schema --- .../stork2/attributeproviders/EHvdAttributeProviderPlugin.java | 10 +++++----- .../EHvdAttribute_deprecatedProviderPlugin.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java index 761460971..70c1af82e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java @@ -52,8 +52,8 @@ import at.gv.egovernment.moa.logging.Logger; import eu.stork.peps.auth.commons.IPersonalAttributeList; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.complex.attributes.IsHealthCareProfessionalType; -import eu.stork.peps.complex.attributes.ObjectFactory; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.IsHealthCareProfessionalType; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.ObjectFactory; /** * Fetches the attribute IsHealthcareProfessional from the BAGDAD SOAP service @@ -67,7 +67,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider { * Instantiates a new e hvd attribute provider plugin. * * @param url the service url - * @param attributes + * @param supportedAttributes */ public EHvdAttributeProviderPlugin(String url, String supportedAttributes) { super(supportedAttributes); @@ -190,10 +190,10 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider { // TODO: we do not have any list of possible values yet. Fix as soon as we get some. // if (collection.get("Type").equals("Medical doctor")) - result.setTypeOfHCP("physician"); + result.setHCPType("physician"); result.setNameOfOrganisation(collection.get("NameOfOrganisation")); - result.setTypeOfOrganisation("Unknown"); + //result.setTypeOfOrganisation("Unknown"); // TODO used in previous version, check what to do with this result.setAQAA(4); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java index 2000ef928..8d7d50370 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java @@ -52,9 +52,9 @@ import at.gv.egovernment.moa.logging.Logger; import eu.stork.peps.auth.commons.IPersonalAttributeList; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.complex.attributes.IsHealthCareProfessionalDeprecatedType; -import eu.stork.peps.complex.attributes.IsHealthCareProfessionalType; -import eu.stork.peps.complex.attributes.ObjectFactory; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.IsHealthCareProfessionalType; // IsHealthCareProfessionalDeprecatedType; +//import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion. _1_0.assertion.IsHealthCareProfessionalType; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.ObjectFactory; /** * Fetches the attribute IsHealthcareProfessional from the BAGDAD SOAP service @@ -68,7 +68,7 @@ public class EHvdAttribute_deprecatedProviderPlugin extends AttributeProvider { * Instantiates a new e hvd attribute provider plugin. * * @param url the service url - * @param attributes + * @param supportedAttributes */ public EHvdAttribute_deprecatedProviderPlugin(String url, String supportedAttributes) { super(supportedAttributes); @@ -187,7 +187,7 @@ public class EHvdAttribute_deprecatedProviderPlugin extends AttributeProvider { acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList(), "NotAvailable"); } else { // go on and parse the data - IsHealthCareProfessionalDeprecatedType result = new IsHealthCareProfessionalDeprecatedType(); + IsHealthCareProfessionalType result = new IsHealthCareProfessionalType(); result.setNameOfOrganisation(collection.get("NameOfOrganisation")); if (collection.get("Type").equals("Medical doctor")) -- cgit v1.2.3 From 3489b058fc9b70814893d93cd9ba602240ab59e0 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 7 Nov 2014 16:06:58 +0100 Subject: adjusting files to use stork2 attributestatustype --- .../egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java | 7 ++++--- .../stork2/attributeproviders/EHvdAttributeProviderPlugin.java | 7 ++++--- .../attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java | 7 ++++--- .../attributeproviders/SignedDocAttributeRequestProvider.java | 3 ++- 4 files changed, 14 insertions(+), 10 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java index 993514ec7..ec823949f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java @@ -32,6 +32,7 @@ import at.gv.egovernment.moa.util.MiscUtil; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.auth.commons.STORKStatusCode; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -150,7 +151,7 @@ public class MOAAttributeProvider { newAttribute.setIsRequired(isRequired); if (attributeValue != null) { - newAttribute.setStatus(STORKStatusCode.STATUS_AVAILABLE.name()); + newAttribute.setStatus(AttributeStatusType.AVAILABLE.value()); Logger.info("Got attribute value: " + attributeValue); if (attributeValue instanceof String) @@ -163,7 +164,7 @@ public class MOAAttributeProvider { } else { Logger.info("Attribute " + storkAttribute + " is not available."); - newAttribute.setStatus(STORKStatusCode.STATUS_NOT_AVAILABLE.name()); + newAttribute.setStatus(AttributeStatusType.NOT_AVAILABLE.value()); } @@ -175,7 +176,7 @@ public class MOAAttributeProvider { } else { Logger.info("Attribute " + storkAttribute + " is not available."); - newAttribute.setStatus(STORKStatusCode.STATUS_NOT_AVAILABLE.name()); + newAttribute.setStatus(AttributeStatusType.NOT_AVAILABLE.value()); } } catch (InvocationTargetException e) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java index 70c1af82e..902f41a4b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java @@ -52,6 +52,7 @@ import at.gv.egovernment.moa.logging.Logger; import eu.stork.peps.auth.commons.IPersonalAttributeList; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.IsHealthCareProfessionalType; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.ObjectFactory; @@ -183,7 +184,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider { if (collection.get("IsHealthcareProfessional").equals("false") || !collection.get("Type").equals("Medical doctor")) { // the citizen is no HCP - acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList(), "NotAvailable"); + acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList(), AttributeStatusType.NOT_AVAILABLE.value()); } else { // go on and parse the data IsHealthCareProfessionalType result = new IsHealthCareProfessionalType(); @@ -206,7 +207,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider { ArrayList value = new ArrayList(); value.add(stringWriter.toString()); - acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, value, "Available"); + acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, value, AttributeStatusType.AVAILABLE.value()); } // pack and return the result @@ -216,7 +217,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider { // add stork id for verification ArrayList value = new ArrayList(); value.add(new BPKBuilder().buildStorkeIdentifier(authData.getIdentityLink(), moastorkRequest.getSpCountry())); - result.add(new PersonalAttribute("eIdentifier", false, value, "Available")); + result.add(new PersonalAttribute("eIdentifier", false, value, AttributeStatusType.AVAILABLE.value())); return result; } catch (Exception e) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java index 8d7d50370..22ff5e85c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java @@ -52,6 +52,7 @@ import at.gv.egovernment.moa.logging.Logger; import eu.stork.peps.auth.commons.IPersonalAttributeList; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.IsHealthCareProfessionalType; // IsHealthCareProfessionalDeprecatedType; //import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion. _1_0.assertion.IsHealthCareProfessionalType; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.ObjectFactory; @@ -184,7 +185,7 @@ public class EHvdAttribute_deprecatedProviderPlugin extends AttributeProvider { if (collection.get("IsHealthcareProfessional").equals("false")) { // the citizen is no HCP - acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList(), "NotAvailable"); + acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList(), AttributeStatusType.NOT_AVAILABLE.value()); } else { // go on and parse the data IsHealthCareProfessionalType result = new IsHealthCareProfessionalType(); @@ -211,7 +212,7 @@ public class EHvdAttribute_deprecatedProviderPlugin extends AttributeProvider { ArrayList value = new ArrayList(); value.add(stringWriter.toString()); - acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, value, "Available"); + acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, value, AttributeStatusType.AVAILABLE.value()); } // pack and return the result @@ -221,7 +222,7 @@ public class EHvdAttribute_deprecatedProviderPlugin extends AttributeProvider { // add stork id for verification ArrayList value = new ArrayList(); value.add(new BPKBuilder().buildStorkeIdentifier(authData.getIdentityLink(), moastorkRequest.getSpCountry())); - result.add(new PersonalAttribute("eIdentifier", false, value, "Available")); + result.add(new PersonalAttribute("eIdentifier", false, value, AttributeStatusType.AVAILABLE.value())); return result; } catch (Exception e) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java index 124b91e8b..501e33a75 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java @@ -46,6 +46,7 @@ import javax.xml.ws.Service; import javax.xml.ws.soap.SOAPBinding; import javax.xml.ws.BindingProvider; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.NotImplementedException; @@ -296,7 +297,7 @@ public class SignedDocAttributeRequestProvider extends AttributeProvider { Logger.debug("Assembling signedDoc attribute"); PersonalAttribute signedDocAttribute = new PersonalAttribute("signedDoc", false, values, - "Available"); + AttributeStatusType.AVAILABLE.value()); // pack and return the result PersonalAttributeList result = new PersonalAttributeList(); -- cgit v1.2.3 From 348dbb4e27c9c076b356b7983feda3d9782dc198 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 7 Nov 2014 16:58:54 +0100 Subject: remove unused libs --- .../gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java | 4 +--- .../egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java index ec823949f..db2d1a64f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java @@ -31,9 +31,7 @@ import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKStatusCode; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; - import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.text.DateFormat; @@ -144,7 +142,7 @@ public class MOAAttributeProvider { private void populateAttributeWithMethod(Method method, Object object, PersonalAttributeList attributeList, String storkAttribute, Boolean isRequired) { try { - Object attributeValue = method.invoke(object, new Class[]{}); + Object attributeValue = method.invoke(object, new Class[]{}); // (Object[]) PersonalAttribute newAttribute = new PersonalAttribute(); newAttribute.setName(storkAttribute); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java index e3b926b00..bfeaee6e3 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java @@ -39,7 +39,6 @@ import eu.stork.peps.auth.commons.IPersonalAttributeList; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.complex.attributes.*; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -- cgit v1.2.3 From 2fd92332b1209e6b6edb80a50f7f221322d313a6 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 7 Nov 2014 19:25:57 +0100 Subject: adjusting mandate and moaattrprovider to new structure --- .../id/protocols/stork2/MOAAttributeProvider.java | 1 - .../protocols/stork2/MandateRetrievalRequest.java | 47 ++++++++++++++++------ 2 files changed, 34 insertions(+), 14 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java index db2d1a64f..136200ed0 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java @@ -133,7 +133,6 @@ public class MOAAttributeProvider { if (authData.getDateOfBirth() != null) { DateFormat fmt = new SimpleDateFormat("yyyyMMdd"); return fmt.format(authData.getDateOfBirth()); - } else return null; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java index bfeaee6e3..929313dd1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java @@ -33,6 +33,7 @@ import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IAction; import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Constants; import eu.stork.peps.auth.commons.IPersonalAttributeList; @@ -64,11 +65,16 @@ public class MandateRetrievalRequest implements IAction { private IAuthData authData; private MOASTORKRequest moaStorkRequest; private IdentityLink representingIdentityLink; + private Integer QAALevel; + private byte[] originalContent; public SLOInformationInterface processRequest(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp, IAuthData authData) throws MOAIDException { Logger.debug("Entering AttributeRequest for MandateProvider"); httpResp.reset(); this.representingIdentityLink = authData.getIdentityLink(); + this.QAALevel = translateQAALevel(authData.getQAALevel()); + + this.originalContent = authData.getMISMandate().getMandate(); OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(req.getOAURL()); @@ -205,6 +211,18 @@ public class MandateRetrievalRequest implements IAction { return null; } + private Integer translateQAALevel(String qaaLevel) throws MOAIDException { + if (qaaLevel.equals(PVPConstants.STORK_QAA_1_1)) + return 1; + if (qaaLevel.equals(PVPConstants.STORK_QAA_1_2)) + return 2; + if (qaaLevel.equals(PVPConstants.STORK_QAA_1_3)) + return 3; + if (qaaLevel.equals(PVPConstants.STORK_QAA_1_4)) + return 4; + Logger.error("Wrong QAA Number format"); + throw new MOAIDException("stork.16", new Object[]{}); + } private String geteLPIdentifier(MandateContainer mandateContainer, PersonalAttribute currentAttribute) throws MOAIDException { RepresentationPersonType represented = getRepresented(mandateContainer, currentAttribute); @@ -212,7 +230,7 @@ public class MandateRetrievalRequest implements IAction { return represented.getELPIdentifier(); } else if (currentAttribute.isRequired()) { Logger.error("Cannot provide eLPIdentifier for natural person."); - throw new MOAIDException("stork.19", new Object[]{currentAttribute.getName()}); + throw new MOAIDException("stork.19", new Object[]{currentAttribute.getName()}); // TODO } return ""; } @@ -255,7 +273,7 @@ public class MandateRetrievalRequest implements IAction { } else if (mandateContainer.getAnnotation().equals("GeneralvollmachtBilateral")) { return "0"; // General Powers } - return ""; + return "7"; } private MandateType getMandateType(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException { @@ -266,7 +284,7 @@ public class MandateRetrievalRequest implements IAction { mandateType.setRepresenting(representative); mandateType.setRepresented(represented); - //mandateType.setMandateContent(mandateContent); // TODO + mandateType.getMandateContent().add(mandateContent); Logger.debug("Complex attribute extracted: " + sourceAttribute.getName()); return mandateType; } @@ -488,7 +506,7 @@ public class MandateRetrievalRequest implements IAction { CorporateBodyMandateContainer corporateBodyMandateContainer = (CorporateBodyMandateContainer) mandateContainer; represented.setELPIdentifier(corporateBodyMandateContainer.getCorpMandatorIdentificationValue()); represented.setLegalName(corporateBodyMandateContainer.getCorpMandatorFullName()); - represented.setTextRegisteredAddress(""); + represented.setTextRegisteredAddress(null); represented.setCanonicalRegisteredAddress(new CanonicalAddressType()); represented.setLegalForm(getCompanyType(corporateBodyMandateContainer.corpMandatorFullName, corporateBodyMandateContainer.corpMandatorIdentificationType, sourceAttribute)); } else if (mandateContainer instanceof PhyPersonMandateContainer) { @@ -510,19 +528,22 @@ public class MandateRetrievalRequest implements IAction { try { XMLGregorianCalendar validFrom = DatatypeFactory.newInstance().newXMLGregorianCalendar(mandateContainer.getMandateValidFrom()); XMLGregorianCalendar validTo = DatatypeFactory.newInstance().newXMLGregorianCalendar(mandateContainer.getMandateValidTo()); - // TODO - //mandateContent.set .setValidFrom(validFrom); - //mandateContent.setValidTo(validTo); + TimeRestrictionType timeRestriction = new TimeRestrictionType(); + timeRestriction.setValidFrom(validFrom); + timeRestriction.setValidTo(validTo); + mandateContent.setTimeRestriction(timeRestriction); } catch (DatatypeConfigurationException dte) { Logger.error("Error converting date from mandate: " + mandateContainer.getMandateValidFrom() + ", " + mandateContainer.getMandateValidTo()); throw new MOAIDException("stork.20", new Object[]{}); } - - //mandateContent.setTransactionLimit(BigInteger.valueOf(0)); // TODO - //mandateContent.setTransactionLimitCurrency("");// TODO - mandateContent.setIsJoint("0"); - mandateContent.setIschained(false); - mandateContent.setTypePower(mapPowersType(mandateContainer)); + mandateContent.setAQAA(this.QAALevel); + mandateContent.setOriginalMandate(originalContent); + mandateContent.setOriginalMandateType("application/xml"); + TransactionLimitRestrictionType transactionLimit = new TransactionLimitRestrictionType(); + mandateContent.setTransactionLimit(transactionLimit); + mandateContent.setIsJoint(""); + mandateContent.setIsChained(false); + mandateContent.setTypeOfPower(mapPowersType(mandateContainer)); // TODO check Logger.debug("Complex attribute extracted: " + sourceAttribute.getName()); return mandateContent; } -- cgit v1.2.3 From 5b78f619548a47bed61b813e1610b6954a74e969 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Mon, 10 Nov 2014 18:44:03 +0100 Subject: original mandate hiding ident --- .../moa/id/protocols/stork2/MandateRetrievalRequest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java index 929313dd1..74af70bda 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java @@ -41,6 +41,9 @@ import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.auth.commons.STORKAttrQueryResponse; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.*; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.codec.binary.StringUtils; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.bind.JAXBContext; @@ -74,8 +77,12 @@ public class MandateRetrievalRequest implements IAction { this.representingIdentityLink = authData.getIdentityLink(); this.QAALevel = translateQAALevel(authData.getQAALevel()); + // preparing original content and removing sensitive data from it this.originalContent = authData.getMISMandate().getMandate(); - + //Logger.debug("Original content " + StringUtils.newStringUtf8(authData.getMISMandate().getMandate())); + String originalMandate = StringUtils.newStringUtf8(authData.getMISMandate().getMandate()).replaceAll(".*?==urn:publicid:gv.at:baseid","");; + Logger.debug("Removing personal identification value and type from original mandate "); + originalContent = StringUtils.getBytesUtf8(originalMandate); OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(req.getOAURL()); if (oaParam == null) -- cgit v1.2.3 From 08301ba3e8a29a8718f426340f4bced616f2765a Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Wed, 12 Nov 2014 17:53:21 +0100 Subject: removing representative --- .../egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java index 74af70bda..1b7982d87 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java @@ -78,7 +78,7 @@ public class MandateRetrievalRequest implements IAction { this.QAALevel = translateQAALevel(authData.getQAALevel()); // preparing original content and removing sensitive data from it - this.originalContent = authData.getMISMandate().getMandate(); + this.originalContent = authData.getMISMandate().getMandate(); // TODO ERROR //Logger.debug("Original content " + StringUtils.newStringUtf8(authData.getMISMandate().getMandate())); String originalMandate = StringUtils.newStringUtf8(authData.getMISMandate().getMandate()).replaceAll(".*?==urn:publicid:gv.at:baseid","");; Logger.debug("Removing personal identification value and type from original mandate "); @@ -288,8 +288,7 @@ public class MandateRetrievalRequest implements IAction { RepresentationPersonType representative = getRepresentative(mandateContainer, sourceAttribute); RepresentationPersonType represented = getRepresented(mandateContainer, sourceAttribute); MandateContentType mandateContent = getMandateContent(mandateContainer, sourceAttribute); - - mandateType.setRepresenting(representative); + mandateType.setRepresentative(representative); mandateType.setRepresented(represented); mandateType.getMandateContent().add(mandateContent); Logger.debug("Complex attribute extracted: " + sourceAttribute.getName()); -- cgit v1.2.3 From ebe6db47b0ba7c6c8f8c6632f1a38a822ac32277 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 14 Nov 2014 13:48:06 +0100 Subject: adding berufmaesige parteivertreter --- .../protocols/stork2/MandateRetrievalRequest.java | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java index 1b7982d87..ed8480ccb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java @@ -273,14 +273,35 @@ public class MandateRetrievalRequest implements IAction { private String mapPowersType(MandateContainer mandateContainer) { + // using if for java 6 compatibility if necessary if (mandateContainer.getAnnotation().equals("ELGABilateral")) { return "6"; // Health Powers } else if (mandateContainer.getAnnotation().equals("ERsB")) { return "0"; // General Powers } else if (mandateContainer.getAnnotation().equals("GeneralvollmachtBilateral")) { return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("ERsBMitPostvollmacht")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("ZVR")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("ZVRMitPostvollmacht")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("EVB")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("Einzelvertretungsbefugnis")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("Prokura")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("Notar")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("Organwalter")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("Rechtsanwalt")) { + return "0"; // General Powers + } else if (mandateContainer.getAnnotation().equals("Ziviltechniker")) { + return "0"; // General Powers } - return "7"; + return "9"; } private MandateType getMandateType(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException { -- cgit v1.2.3 From 3eab8b05d4974d996a9966909daeb090e16e6cab Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 27 Nov 2014 18:35:28 +0100 Subject: reenabled new isHCP attribute for stork --- .../stork2/attributeproviders/EHvdAttributeProviderPlugin.java | 2 +- .../attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java index 902f41a4b..bd1576020 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java @@ -191,7 +191,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider { // TODO: we do not have any list of possible values yet. Fix as soon as we get some. // if (collection.get("Type").equals("Medical doctor")) - result.setHCPType("physician"); + result.setTypeOfHCP("physician"); result.setNameOfOrganisation(collection.get("NameOfOrganisation")); //result.setTypeOfOrganisation("Unknown"); // TODO used in previous version, check what to do with this diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java index 22ff5e85c..a16603beb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttribute_deprecatedProviderPlugin.java @@ -53,6 +53,7 @@ import eu.stork.peps.auth.commons.IPersonalAttributeList; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType; +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.IsHealthCareProfessionalDeprecatedType; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.IsHealthCareProfessionalType; // IsHealthCareProfessionalDeprecatedType; //import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion. _1_0.assertion.IsHealthCareProfessionalType; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.ObjectFactory; @@ -188,7 +189,7 @@ public class EHvdAttribute_deprecatedProviderPlugin extends AttributeProvider { acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList(), AttributeStatusType.NOT_AVAILABLE.value()); } else { // go on and parse the data - IsHealthCareProfessionalType result = new IsHealthCareProfessionalType(); + IsHealthCareProfessionalDeprecatedType result = new IsHealthCareProfessionalDeprecatedType(); result.setNameOfOrganisation(collection.get("NameOfOrganisation")); if (collection.get("Type").equals("Medical doctor")) @@ -203,11 +204,11 @@ public class EHvdAttribute_deprecatedProviderPlugin extends AttributeProvider { result.setAQAA(4); - final Marshaller m = JAXBContext.newInstance(IsHealthCareProfessionalType.class).createMarshaller(); + final Marshaller m = JAXBContext.newInstance(IsHealthCareProfessionalDeprecatedType.class).createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); StringWriter stringWriter = new StringWriter(); - m.marshal(new ObjectFactory().createIsHealthCareProfessional(result), stringWriter); + m.marshal(new ObjectFactory().createIsHealthCareProfessionalDeprecated(result), stringWriter); ArrayList value = new ArrayList(); value.add(stringWriter.toString()); -- cgit v1.2.3 From 84eeb92c422102e3fd04b0140db6af2ecd2623ec Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 28 Nov 2014 15:46:12 +0100 Subject: fixed optional signeddoc attribute query --- .../main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java | 1 + 1 file changed, 1 insertion(+) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index a33c4fdf4..5e4aee81b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1781,6 +1781,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { // add sign request PersonalAttribute newAttribute = new PersonalAttribute(); newAttribute.setName("signedDoc"); + newAttribute.setIsRequired(true); List value = new ArrayList(); Logger.debug("PEPS supports XMLSignatures:"+cpeps.isXMLSignatureSupported()); -- cgit v1.2.3