You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2011/08/24 18:46:23 UTC
svn commit: r1161198 - in
/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml:
JAXRSSamlTest.java server.xml
Author: sergeyb
Date: Wed Aug 24 16:46:23 2011
New Revision: 1161198
URL: http://svn.apache.org/viewvc?rev=1161198&view=rev
Log:
[CXF-3587] Optionally signing content exclusive of SAML tokens
Modified:
cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml
Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java?rev=1161198&r1=1161197&r2=1161198&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java (original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java Wed Aug 24 16:46:23 2011
@@ -38,6 +38,7 @@ import org.apache.cxf.message.Message;
import org.apache.cxf.rs.security.saml.SamlEnvelopedOutInterceptor;
import org.apache.cxf.rs.security.saml.SamlFormOutInterceptor;
import org.apache.cxf.rs.security.saml.SamlHeaderOutInterceptor;
+import org.apache.cxf.rs.security.xml.XmlSigOutInterceptor;
import org.apache.cxf.systest.jaxrs.security.Book;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.BeforeClass;
@@ -103,7 +104,10 @@ public class JAXRSSamlTest extends Abstr
String address = "https://localhost:" + PORT + "/samlxml/bookstore/books";
WebClient wc = createWebClient(address, new SamlEnvelopedOutInterceptor(),
null);
+ XmlSigOutInterceptor xmlSig = new XmlSigOutInterceptor();
+ xmlSig.setEnvelopeQName(XmlSigOutInterceptor.DEFAULT_ENV_QNAME);
+ WebClient.getConfig(wc).getOutInterceptors().add(xmlSig);
wc.type(MediaType.APPLICATION_XML).accept(MediaType.APPLICATION_XML);
try {
Book book = wc.post(new Book("CXF", 125L), Book.class);
Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml?rev=1161198&r1=1161197&r2=1161198&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml (original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/server.xml Wed Aug 24 16:46:23 2011
@@ -69,6 +69,8 @@ under the License.
<bean id="samlFormHandler" class="org.apache.cxf.rs.security.saml.SamlFormInHandler"/>
<bean id="samlEnvHandler" class="org.apache.cxf.rs.security.saml.SamlEnvelopedInHandler"/>
+ <bean id="xmlSigHandler" class="org.apache.cxf.rs.security.xml.XmlSigInHandler"/>
+
<jaxrs:server
address="https://localhost:${testutil.ports.jaxrs-saml}/samlheader">
<jaxrs:serviceBeans>
@@ -107,6 +109,7 @@ under the License.
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
+ <ref bean="xmlSigHandler"/>
<ref bean="samlEnvHandler"/>
</jaxrs:providers>