Author: anil.saldhana(a)jboss.com
Date: 2009-03-21 22:54:29 -0400 (Sat, 21 Mar 2009)
New Revision: 394
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/servlets/SOAPSAMLXACMLServlet.java
Log:
JBID-65: id, version and issueInstant on assertion
Modified:
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/servlets/SOAPSAMLXACMLServlet.java
===================================================================
---
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/servlets/SOAPSAMLXACMLServlet.java 2009-03-22
02:51:39 UTC (rev 393)
+++
identity-federation/trunk/identity-bindings/src/main/java/org/jboss/identity/federation/bindings/servlets/SOAPSAMLXACMLServlet.java 2009-03-22
02:54:29 UTC (rev 394)
@@ -43,6 +43,7 @@
import org.apache.log4j.Logger;
import org.jboss.identity.federation.api.saml.v2.common.IDGenerator;
import org.jboss.identity.federation.api.saml.v2.response.SAML2Response;
+import org.jboss.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.jboss.identity.federation.core.saml.v2.factories.SAMLAssertionFactory;
import org.jboss.identity.federation.core.saml.v2.factories.SOAPFactory;
import org.jboss.identity.federation.core.saml.v2.holders.IssuerInfoHolder;
@@ -159,10 +160,9 @@
}
else
if(samlRequest instanceof Element)
- {
- log.trace("Problem in the input file: Working on the
element.");
+ {
Element elem = (Element) samlRequest;
- xacmlRequest = SOAPSAMLXACMLUtil.getWorkaround(elem);
+ xacmlRequest = SOAPSAMLXACMLUtil.getXACMLQueryType(elem);
}
}
else if(element instanceof XACMLAuthzDecisionQueryType)
@@ -191,13 +191,17 @@
//Place the xacml statement in an assertion
//Then the assertion goes inside a SAML Response
+ String ID = IDGenerator.create("ID_");
SAML2Response saml2Response = new SAML2Response();
IssuerInfoHolder issuerInfo = new IssuerInfoHolder(this.issuer);
AssertionType assertion =
SAMLAssertionFactory.getObjectFactory().createAssertionType();
assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().add(xacmlStatement);
+ assertion.setID(ID);
+ assertion.setVersion(JBossSAMLConstants.VERSION_2_0.get());
+ assertion.setIssuer(issuerInfo.getIssuer());
- JAXBElement<?> jaxbResponse =
JAXBElementMappingUtil.get(saml2Response.createResponseType(IDGenerator.create("ID_"),
issuerInfo, assertion));
+ JAXBElement<?> jaxbResponse =
JAXBElementMappingUtil.get(saml2Response.createResponseType(ID, issuerInfo, assertion));
//Create a SOAP Envelope to hold the SAML response
envelope = this.createEnvelope(jaxbResponse);
Show replies by date