aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-eIDAS/src
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2016-01-11 08:59:01 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2016-01-11 08:59:01 +0100
commitf2cb73708f9bf18f0d71a950662e7701e33e0ee5 (patch)
treefa782508162f234a71528a86e69834e42b504dcb /id/server/modules/moa-id-module-eIDAS/src
parent5371cce8ad520a49840c37cdf1d952c233f47320 (diff)
downloadmoa-id-spss-f2cb73708f9bf18f0d71a950662e7701e33e0ee5.tar.gz
moa-id-spss-f2cb73708f9bf18f0d71a950662e7701e33e0ee5.tar.bz2
moa-id-spss-f2cb73708f9bf18f0d71a950662e7701e33e0ee5.zip
fixing request (in progress)
Diffstat (limited to 'id/server/modules/moa-id-module-eIDAS/src')
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java13
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java10
2 files changed, 17 insertions, 6 deletions
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java
index c4f7bdae0..8b1dae22e 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java
@@ -35,6 +35,8 @@ import org.apache.velocity.app.VelocityEngine;
import eu.eidas.auth.commons.EIDASAuthnRequest;
import eu.eidas.auth.commons.EIDASUtil;
+import eu.eidas.auth.commons.EidasLoaCompareType;
+import eu.eidas.auth.commons.EidasLoaLevels;
import eu.eidas.auth.commons.IPersonalAttributeList;
import eu.eidas.auth.commons.PersonalAttribute;
import eu.eidas.auth.commons.PersonalAttributeList;
@@ -99,15 +101,20 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask {
//build eIDAS AuthnRequest
EIDASAuthnRequest authnRequest = new EIDASAuthnRequest();
- String assertionConsumerURL="https://demo.a-sit.at/EidasNode/ServiceProvider";
+ String assertionConsumerURL="https://demo.a-sit.at/EidasNode/ColleagueRequest";
authnRequest.setAssertionConsumerServiceURL(assertionConsumerURL);
String providerName = "sp3fr-moa";
authnRequest.setProviderName(providerName);
- int qaaLevel = 1;
- authnRequest.setQaa(qaaLevel);
+// int qaaLevel = 1;
+// authnRequest.setQaa(qaaLevel); // not needed anymore. furthermore this may make the node think the request at hand is a stork request and we do not want that.
authnRequest.setPersonalAttributeList(pAttList);
String issuer = "http://localhost:12344/moa-id-auth/eidas/metadata";
authnRequest.setIssuer(issuer);
+ authnRequest.setDestination(assertionConsumerURL);
+ authnRequest.setEidasNameidFormat(EIDASAuthnRequest.NAMEID_FORMAT_UNSPECIFIED);
+ authnRequest.setEidasLoA(EidasLoaLevels.LOW.stringValue());
+ authnRequest.setEidasLoACompareType(EidasLoaCompareType.MINIMUM.stringValue());
+ authnRequest.setAlias(providerName);
engine.initRequestedAttributes(pAttList);
authnRequest = engine.generateEIDASAuthnRequest(authnRequest);
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java
index dd7671765..c8df9ca97 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java
@@ -51,10 +51,12 @@ public class EidasMetaDataServlet extends HttpServlet {
try {
logger.info("EidasMetaDataServlet GET");
- String metadata_url = "metadataurl";
- String sp_return_url = "sp_return_url";
+ String metadata_url = "http://localhost:12344/moa-id-auth/eidas/metadata";
+ String sp_return_url = "http://localhost:12344/moa-id-auth/eidas/metadata";
String metaData = generateMetadata(metadata_url, sp_return_url);
+ logger.debug(metaData);
+
response.setContentType("text/html");
response.getWriter().print(metaData);
response.flushBuffer();
@@ -80,7 +82,9 @@ public class EidasMetaDataServlet extends HttpServlet {
generator.setConfigParams(mcp);
generator.initialize(engine);
mcp.setEntityID(metadata_url);
- generator.addSPRole(); // TODO addIDPRole();
+ mcp.setAssertionConsumerUrl(metadata);
+ generator.addSPRole();
+ generator.addIDPRole();
String returnUrl = sp_return_url;
mcp.setAssertionConsumerUrl(returnUrl);
metadata = generator.generateMetadata();