aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
authorBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-02-26 16:32:48 +0100
committerBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-02-26 16:32:48 +0100
commitcaee81b311e93720d4c1fe2b3de22cdcbb0fe74d (patch)
tree8774a498a60861bfd00fcd8036e2c695721df906 /id/server/idserverlib/src
parentf51b28c24ac466b5e25d3047975beac8f14d2c15 (diff)
downloadmoa-id-spss-caee81b311e93720d4c1fe2b3de22cdcbb0fe74d.tar.gz
moa-id-spss-caee81b311e93720d4c1fe2b3de22cdcbb0fe74d.tar.bz2
moa-id-spss-caee81b311e93720d4c1fe2b3de22cdcbb0fe74d.zip
config
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java55
1 files changed, 31 insertions, 24 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
index 6ef85d7ae..db3e12f43 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
@@ -4,6 +4,7 @@ import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
import at.gv.egovernment.moa.id.auth.exception.AuthenticationException;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.stork.VelocityProvider;
+import at.gv.egovernment.moa.id.commons.db.dao.config.StorkAttribute;
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.IAction;
@@ -64,7 +65,7 @@ public class AuthenticationRequest implements IAction {
Logger.debug("STORK QAA 2 :" + ((MOASTORKAuthnRequest) req).getStorkAuthnRequest().getQAALevel());
StartAuthResponse startAuthResponse = getStartAuthResponse(((MOASTORKAuthnRequest) req).getStorkAuthnRequest());
- HttpSession httpSession = httpReq.getSession();
+ HttpSession httpSession = httpReq.getSession(); performRed
httpSession.setAttribute("STORKSessionID", "12345");
httpResp.setStatus(startAuthResponse.getHttpStatusCode());
try {
@@ -102,12 +103,37 @@ public class AuthenticationRequest implements IAction {
throw new AuthenticationException("stork.12", new Object[] { moasession.getPublicOAURLPrefix() });
+ // Prepare basic AT attributes
+ try {
+ IPersonalAttributeList moaAttrList = moasession.getStorkAttributes();
+ Logger.info("Found number of moa personal attributes: " + moasession.getStorkAttributes().size());
+
+
+ for (PersonalAttribute personalAttribute : moaAttrList) {
+ Logger.info("Personal attribute found: " + personalAttribute.getName() + personalAttribute.getStatus());
+ if (personalAttribute.getValue().size() > 0) {
+ for (String value : personalAttribute.getValue()) {
+ Logger.info(" Value found: " + value);
+ }
+ }
+ }
+
+ } catch (Exception e) {
+ Logger.error("Exception, attributes: " + e.getMessage());
+ }
+
+ authnResponse.setPersonalAttributeList(populateAttributes());
+
+ // Prepare extended attributes
+ Logger.debug("Preparing data container");
+
//httpResp.setStatus(200);
//VPEPSInboundPostHandler
// create fresh container
DataContainer container = new DataContainer();
-
+
+
// - fill in the request we extracted above
container.setRequest(((MOASTORKAuthnRequest) req).getStorkAuthnRequest());
@@ -118,39 +144,20 @@ public class AuthenticationRequest implements IAction {
container.setTarget(((MOASTORKAuthnRequest) req).getStorkAuthnRequest().getAssertionConsumerServiceURL());
+ Logger.debug("Data container prepared");
- if (1==1) // test
+ if (1==0) // test
// see if we need to fetch further attributes
return (new AttributeCollector()).processRequest(container, httpReq, httpResp, oaParam);
+ Logger.debug("Finished sending data container");
-
- try {
- IPersonalAttributeList moaAttrList = moasession.getStorkAttributes();
- Logger.info("Found number of moa personal attributes: " + moasession.getStorkAttributes().size());
-
-
- for (PersonalAttribute personalAttribute : moaAttrList) {
- Logger.info("Personal attribute found: " + personalAttribute.getName() + personalAttribute.getStatus());
- if (personalAttribute.getValue().size() > 0) {
- for (String value : personalAttribute.getValue()) {
- Logger.info(" Value found: " + value);
- }
- }
- }
-
- } catch (Exception e) {
- Logger.error("Exception, attributes: " + e.getMessage());
- }
-
- authnResponse.setPersonalAttributeList(populateAttributes());
-
try {
//Get SAMLEngine instance
STORKSAMLEngine engine = STORKSAMLEngine.getInstance("incoming");