aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-eIDAS
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/modules/moa-id-module-eIDAS')
-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();