aboutsummaryrefslogtreecommitdiff
path: root/DocumentService/src/eu/stork/documentservice/utils/GetDSSFileAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'DocumentService/src/eu/stork/documentservice/utils/GetDSSFileAction.java')
-rw-r--r--DocumentService/src/eu/stork/documentservice/utils/GetDSSFileAction.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/DocumentService/src/eu/stork/documentservice/utils/GetDSSFileAction.java b/DocumentService/src/eu/stork/documentservice/utils/GetDSSFileAction.java
index b80c63dc2..2fce0165d 100644
--- a/DocumentService/src/eu/stork/documentservice/utils/GetDSSFileAction.java
+++ b/DocumentService/src/eu/stork/documentservice/utils/GetDSSFileAction.java
@@ -16,6 +16,7 @@ package eu.stork.documentservice.utils;
import org.apache.log4j.Logger;
import org.bouncycastle.util.encoders.UrlBase64;
+import org.opensaml.xml.ConfigurationException;
import eu.stork.peps.auth.commons.IPersonalAttributeList;
import eu.stork.peps.auth.commons.PEPSUtil;
@@ -59,8 +60,10 @@ public final class GetDSSFileAction {
final PersonalAttribute sdoc = pal.get("docRequest");
if (sdoc != null)
{
- String docId = sdoc.getValue().get(0);
- return docId;
+ String docId = sdoc.getValue().get(0);//remove countries from beginning
+ docId = docId.substring(docId.indexOf("/")+1);
+ docId = docId.substring(docId.indexOf('/')+1);
+ return docId.replace("/", "");
}
} catch (final STORKSAMLEngineException e) {
e.printStackTrace();
@@ -73,7 +76,13 @@ public final class GetDSSFileAction {
// fetch the samlToken from the request
final byte[] samlToken = UrlBase64.decode(samlRequest);
-
+ //System.out.println("SAML Engine DokumentService init");
+ try {
+ Bootstrap.bootstrap();
+ } catch (ConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
final STORKSAMLEngine engine = STORKSAMLEngine.getInstance(SAML_INSTANCE);
final STORKAttrQueryRequest attrData= engine.validateSTORKAttrQueryRequest(samlToken);