Author: mmoyses
Date: 2010-10-07 14:00:50 -0400 (Thu, 07 Oct 2010)
New Revision: 441
Modified:
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2HandlerClient.java
Log:
includind the assertion in the context map instead of the saml credential
Modified:
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2HandlerClient.java
===================================================================
---
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2HandlerClient.java 2010-10-07
15:14:24 UTC (rev 440)
+++
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2HandlerClient.java 2010-10-07
18:00:50 UTC (rev 441)
@@ -28,15 +28,14 @@
import org.jboss.ws.extensions.security.Util;
import org.jboss.ws.extensions.security.element.SecurityHeader;
import org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer;
-import org.picketlink.identity.federation.core.wstrust.SamlCredential;
import org.picketlink.trust.jbossws.SAML2Constants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
* A client side WS handler.
- * It expects a {@link SamlCredential} as the value of the {@link
SAML2Constants#SAML2_ASSERTION_PROPERTY} property.
- * The assertion contained in the credential is then included in the SOAP payload.
+ * It expects a {@link Element} assertion as the value of the {@link
SAML2Constants#SAML2_ASSERTION_PROPERTY} property.
+ * This assertion is then included in the SOAP payload.
*
* @author <a href="mmoyses(a)redhat.com">Marcus Moyses</a>
* @version $Revision: 1 $
@@ -56,7 +55,7 @@
SOAPMessageImpl soapMessage = (SOAPMessageImpl) ctx.getSOAPMessage();
// retrieve assertion
- SamlCredential credential = (SamlCredential)
ctx.get(SAML2Constants.SAML2_ASSERTION_PROPERTY);
+ Element assertion = (Element) ctx.get(SAML2Constants.SAML2_ASSERTION_PROPERTY);
// add wsse header
Document document = soapMessage.getSOAPPart();
@@ -64,7 +63,6 @@
SecurityHeader secHeader = new SecurityHeader(document);
try
{
- Element assertion = credential.getAssertionAsElement();
Element wsse = secHeader.getElement();
wsse.setAttributeNS(soapHeader.getNamespaceURI(), soapHeader.getPrefix() +
":mustUnderstand", "1");
// add the assertion as a child of the wsse header
Show replies by date