aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-01-30 12:27:48 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-01-30 12:27:48 +0100
commit07f8780c58390f55c42dced89c8e57ab0dd16dda (patch)
tree4c5bd44099772525b7339444e980d0e1af7423ae /id/server/idserverlib/src
parent0cc83ff3f041f0b79d20c3bf2dad14e7ab7301ae (diff)
parent0fbc9476dfb70a1c542ba3491a329f6286fe949e (diff)
downloadmoa-id-spss-07f8780c58390f55c42dced89c8e57ab0dd16dda.tar.gz
moa-id-spss-07f8780c58390f55c42dced89c8e57ab0dd16dda.tar.bz2
moa-id-spss-07f8780c58390f55c42dced89c8e57ab0dd16dda.zip
Merge STORK DocumentService fix
Conflicts: id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java23
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java10
2 files changed, 26 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java
index 0d40c9c9a..d0cd05482 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java
@@ -61,6 +61,7 @@ import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
import at.gv.egovernment.moa.id.auth.stork.STORKException;
import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor;
import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
import at.gv.egovernment.moa.id.moduls.ModulUtils;
@@ -116,15 +117,25 @@ public class PEPSConnectorServlet extends AuthServlet {
public PEPSConnectorServlet()
{
super();
- Properties props = new Properties();
+
try {
- props.load(DatabaseConnectorMySQLImpl.class.getResourceAsStream("docservice.properties"));
- dtlUrl = props.getProperty("docservice.url");
- } catch (IOException e) {
+ AuthConfigurationProvider authConfigurationProvider = AuthConfigurationProvider.getInstance();
+ dtlUrl = authConfigurationProvider.getDocumentServiceUrl();
+ } catch (Exception e) {
dtlUrl = "http://testvidp.buergerkarte.at/DocumentService/DocumentService";
- Logger.error("Loading DTL config failed, using default value:"+dtlUrl);
e.printStackTrace();
- }
+ Logger.error("Loading documentservice url failed, using default value:"+dtlUrl);
+ }
+
+// 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();
+// }
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
index 2a016fa8b..80364a2ab 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
@@ -1081,13 +1081,21 @@ public class AuthConfigurationProvider extends ConfigurationProvider {
return !Boolean.valueOf(prop);
}
+
+ //Load document service url from moa properties
+ public String getDocumentServiceUrl() {
+ String prop = props.getProperty("stork.documentservice.url", "false");
+ return prop;
+ }
+
+
public boolean isPVPSchemaValidationActive() {
String prop = props.getProperty("protocols.pvp2.schemavalidation", "true");
return Boolean.valueOf(prop);
}
/**
- * Retruns the STORK Configuration
+ * Returns the STORK Configuration
* @return STORK Configuration
* @throws ConfigurationException
*/