aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-06-18 11:12:04 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-06-18 11:12:04 +0200
commit2f0511d495a107b3a48b378084f0bbc74d7d5fb7 (patch)
tree8a6df12bdb6a26545d2849d008611a4c4515a479 /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
parente950948eb691581e58607e633847e6f4b93769f9 (diff)
downloadmoa-id-spss-2f0511d495a107b3a48b378084f0bbc74d7d5fb7.tar.gz
moa-id-spss-2f0511d495a107b3a48b378084f0bbc74d7d5fb7.tar.bz2
moa-id-spss-2f0511d495a107b3a48b378084f0bbc74d7d5fb7.zip
Fixing issue #2
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
index 9e795c51c..4f778f27b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
@@ -7,7 +7,6 @@ import javax.servlet.http.HttpServletResponse;
import org.joda.time.DateTime;
import org.opensaml.common.xml.SAMLConstants;
-import org.opensaml.saml2.core.ArtifactResponse;
import org.opensaml.saml2.core.Assertion;
import org.opensaml.saml2.core.Attribute;
import org.opensaml.saml2.core.AttributeStatement;
@@ -21,6 +20,7 @@ import org.opensaml.saml2.core.Conditions;
import org.opensaml.saml2.core.Issuer;
import org.opensaml.saml2.core.NameID;
import org.opensaml.saml2.core.RequestedAuthnContext;
+import org.opensaml.saml2.core.Response;
import org.opensaml.saml2.core.Subject;
import org.opensaml.saml2.core.SubjectConfirmation;
import org.opensaml.saml2.core.SubjectConfirmationData;
@@ -89,6 +89,11 @@ public class AuthnRequestHandler implements IRequestHandler, PVPConstants {
throw new NoAuthContextException("QAA not available Only supported QAA: " + STORK_QAA_1_4, null);
}
+ AuthenticationSession authSession =
+ AuthenticationManager.getAuthenticationSession(req.getSession());
+
+ //authSession.getM
+
Assertion assertion = SAML2Utils.createSAMLObject(Assertion.class);
reqAuthnContextClassRefIt = reqAuthnContext.getAuthnContextClassRefs().iterator();
@@ -134,10 +139,6 @@ public class AuthnRequestHandler implements IRequestHandler, PVPConstants {
AttributeConsumingService attributeConsumingService =
spSSODescriptor.getAttributeConsumingServices().get(idx);
-
- AuthenticationSession authSession =
- AuthenticationManager.getAuthenticationSession(req.getSession());
-
AttributeStatement attributeStatement = SAML2Utils.createSAMLObject(AttributeStatement.class);
Iterator<RequestedAttribute> it = attributeConsumingService.getRequestAttributes().iterator();
@@ -210,14 +211,14 @@ public class AuthnRequestHandler implements IRequestHandler, PVPConstants {
assertion.setID(SAML2Utils.getSecureIdentifier());
assertion.setIssueInstant(new DateTime());
- ArtifactResponse authResponse = SAML2Utils.createSAMLObject(ArtifactResponse.class);
+ Response authResponse = SAML2Utils.createSAMLObject(Response.class);
Issuer nissuer = SAML2Utils.createSAMLObject(Issuer.class);
nissuer.setValue(PVPConfiguration.getInstance().getIDPIssuerName());
nissuer.setFormat(NameID.ENTITY);
authResponse.setIssuer(nissuer);
authResponse.setInResponseTo(authnRequest.getID());
- authResponse.setMessage(assertion);
+ authResponse.getAssertions().add(assertion);
authResponse.setStatus(SAML2Utils.getSuccessStatus());
aIdx = authnRequest.getAssertionConsumerServiceIndex();