diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-06-11 12:24:15 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-06-11 12:24:15 +0200 |
commit | 687987c9e57bc22d3306674886d8246b19775ae0 (patch) | |
tree | 943603f16ae2de48e2d5d625e5ef55933e2233ad /id/server/idserverlib/src/main/java/at/gv | |
parent | 9a6e85be96ebfbdc35c105a1731439a1090e6f1d (diff) | |
parent | 1b30ac3a6862a0a07997be6216dd05d34757d504 (diff) | |
download | moa-id-spss-687987c9e57bc22d3306674886d8246b19775ae0.tar.gz moa-id-spss-687987c9e57bc22d3306674886d8246b19775ae0.tar.bz2 moa-id-spss-687987c9e57bc22d3306674886d8246b19775ae0.zip |
Merge branch 'moa-2.1-Snapshot' of gitlab.iaik.tugraz.at:afitzek/moa-idspss into moa-2.1-Snapshot
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java | 16 |
1 files changed, 14 insertions, 2 deletions
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 ae10cc1c8..a44539402 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 @@ -9,6 +9,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Properties; import javax.activation.DataSource; import javax.servlet.http.HttpServletRequest; @@ -57,6 +58,7 @@ import eu.stork.peps.auth.commons.STORKAttrQueryRequest; import eu.stork.peps.auth.engine.STORKSAMLEngine; import eu.stork.peps.exceptions.STORKSAMLEngineException; import eu.stork.documentservice.DocumentService; +import eu.stork.documentservice.data.DatabaseConnectorMySQLImpl; /** * Forwards a signedDoc attribute request to the oasis-dss service instance */ @@ -81,7 +83,16 @@ public class SignedDocAttributeRequestProvider extends AttributeProvider { super(attributes); this.oasisDssWebFormURL = oasisDssWebFormURL; //TODO load dtlUrl from config - dtlUrl = "http://mopsos.iaik.tugraz.at:8080/DocumentService/DocumentService"; + + Properties props = new Properties(); + try { + props.load(DatabaseConnectorMySQLImpl.class.getResourceAsStream("docservice.properties")); + dtlUrl = props.getProperty("docservice.url"); + } catch (IOException e) { + dtlUrl = "http://testvidp.buergerkarte.at/DocumentService/DocumentService"; + Logger.error("Loading DTL config failed, using default value:"+dtlUrl); + e.printStackTrace(); + } } /* @@ -394,11 +405,12 @@ public class SignedDocAttributeRequestProvider extends AttributeProvider { */ private String getDocTransferRequest(String docId, String destinationUrl) throws Exception { + String spCountry = docId.substring(0, docId.indexOf("/")); final STORKSAMLEngine engine = STORKSAMLEngine.getInstance("VIDP"); STORKAttrQueryRequest req = new STORKAttrQueryRequest(); req.setAssertionConsumerServiceURL(dtlUrl); req.setDestination(destinationUrl); - req.setSpCountry("IS");//FIXME + req.setSpCountry(spCountry); req.setQaa(3);//TODO PersonalAttributeList pal = new PersonalAttributeList(); PersonalAttribute attr = new PersonalAttribute(); |