aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-01-27 06:46:21 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-01-27 06:46:21 +0100
commit4dfca16cb46126d564240767a89fe8a9f4f9bcdf (patch)
tree9fee58a1ba475f359992233dffc14e3fc206a978 /id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment
parent86cbb2b42468b71cc9c04785d075260cf80fbb9f (diff)
parent3ca240a596e3d2d22a7a6c68ce9c34dda9168e2c (diff)
downloadmoa-id-spss-4dfca16cb46126d564240767a89fe8a9f4f9bcdf.tar.gz
moa-id-spss-4dfca16cb46126d564240767a89fe8a9f4f9bcdf.tar.bz2
moa-id-spss-4dfca16cb46126d564240767a89fe8a9f4f9bcdf.zip
Merge branch 'eSense_eIDAS_development' into moa-id-3.2_(OPB)
Conflicts: id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java
Diffstat (limited to 'id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment')
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java13
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java7
2 files changed, 8 insertions, 12 deletions
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java
index c8f6bba9c..5040f1fe3 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java
@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
+import org.springframework.http.MediaType;
import at.gv.egovernment.moa.id.auth.builder.BPKBuilder;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
@@ -40,8 +41,6 @@ import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASChainingMetada
import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASMetadataProviderDecorator;
import at.gv.egovernment.moa.id.auth.modules.eidas.utils.MOAPersonalAttributeList;
import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils;
-import at.gv.egovernment.moa.id.config.auth.AuthConfiguration;
-import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.data.IAuthData;
import at.gv.egovernment.moa.id.data.SLOInformationInterface;
import at.gv.egovernment.moa.id.moduls.IAction;
@@ -103,7 +102,6 @@ public class AuthenticationRequest implements IAction {
response.setPersonalAttributeList(resultingAttributeList);
// - create metadata url
- AuthConfiguration config = AuthConfigurationProviderFactory.getInstance();
String pubURLPrefix = req.getAuthURL();
String metadata_url = pubURLPrefix + Constants.eIDAS_HTTP_ENDPOINT_METADATA;
response.setIssuer(metadata_url);
@@ -149,10 +147,10 @@ public class AuthenticationRequest implements IAction {
template.merge(context, writer);
Logger.trace("Template merge done");
- Logger.trace("Sending html content: " + writer.getBuffer().toString());
- Logger.trace("Sending html content2 : " + new String(writer.getBuffer()));
+ Logger.trace("Sending html content : " + new String(writer.getBuffer()));
httpResp.getOutputStream().write(writer.getBuffer().toString().getBytes("UTF-8"));
+ httpResp.setContentType(MediaType.TEXT_HTML_VALUE);
} catch (Exception e) {
Logger.error("Velocity error: " + e.getMessage());
@@ -167,9 +165,8 @@ public class AuthenticationRequest implements IAction {
}
@Override
- public String getDefaultActionName() {
- // TODO Auto-generated method stub
- return null;
+ public String getDefaultActionName() {
+ return "eIDAS_AuthnRequest";
}
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java
index 0be291a06..31594f515 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java
@@ -15,10 +15,12 @@
* limitations under the Licence.
*******************************************************************************/
package at.gv.egovernment.moa.id.protocols.eidas;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
+import org.springframework.http.MediaType;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.modules.eidas.Constants;
@@ -37,9 +39,7 @@ import eu.eidas.engine.exceptions.SAMLEngineException;
/**
* First version to provide some valid metadata to an asking eIDaS node
*/
-//@WebServlet("/eidas/metadata")
public class EidasMetaDataRequest implements IAction {
- private static final long serialVersionUID = -2129228304760706063L;
private Logger logger = org.slf4j.LoggerFactory.getLogger(EidasMetaDataRequest.class);
/* (non-Javadoc)
@@ -62,10 +62,9 @@ public class EidasMetaDataRequest implements IAction {
logger.trace(metaData);
- httpResp.setContentType("text/xml");
+ httpResp.setContentType(MediaType.TEXT_XML_VALUE);
httpResp.getWriter().print(metaData);
httpResp.flushBuffer();
-
} catch (Exception e) {
e.printStackTrace();
}