cxf git commit: Fix samples checkstyles issues so the builds should be able to finish
Repository: cxf Updated Branches: refs/heads/master ca2f8e811 -> aeecef532 Fix samples checkstyles issues so the builds should be able to finish Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/aeecef53 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/aeecef53 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/aeecef53 Branch: refs/heads/master Commit: aeecef53263cd1d595d991654f0a783a10adfdcb Parents: ca2f8e8 Author: Daniel Kulp Authored: Fri Jun 10 15:19:53 2016 -0400 Committer: Daniel Kulp Committed: Fri Jun 10 15:19:53 2016 -0400 -- .../main/java/demo/stream/interceptor/StreamInterceptor.java| 2 +- .../jax_rs/basic/src/main/java/demo/jaxrs/client/Client.java| 2 +- .../basic_https/src/main/java/httpsdemo/client/Client.java | 2 +- .../src/main/java/demo/jaxrs/client/Client.java | 4 ++-- .../src/main/java/demo/jaxrs/swagger/server/Server.java | 5 +++-- .../src/main/java/demo/jaxrs/client/WebSocketTestClient.java| 4 ++-- .../src/main/java/demo/jaxrs/server/CustomerService.java| 3 +++ .../src/main/java/demo/jaxrs/server/CustomerService.java| 3 +++ .../src/main/java/demo/jaxrs/server/CustomerService.java| 3 +++ .../demo/oauth/server/controllers/MemoryOAuthDataProvider.java | 3 +-- .../src/main/java/demo/ws_rm/common/MessageLossSimulator.java | 2 +- 11 files changed, 21 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/aeecef53/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java -- diff --git a/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java b/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java index 22b9cb4..e534329 100644 --- a/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java +++ b/distribution/src/main/release/samples/configuration_interceptor/src/main/java/demo/stream/interceptor/StreamInterceptor.java @@ -83,7 +83,7 @@ public class StreamInterceptor extends AbstractPhaseInterceptor { private class CachedStream extends CachedOutputStream { -public CachedStream() { +CachedStream() { super(); } http://git-wip-us.apache.org/repos/asf/cxf/blob/aeecef53/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/client/Client.java -- diff --git a/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/client/Client.java b/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/client/Client.java index c1e21d0..4267b84 100644 --- a/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/client/Client.java +++ b/distribution/src/main/release/samples/jax_rs/basic/src/main/java/demo/jaxrs/client/Client.java @@ -90,7 +90,7 @@ public final class Client { resolver = new URIResolver(inputFile); input = new File(resolver.getURI()); PostMethod post = new PostMethod("http://localhost:9000/customerservice/customers";); -post.addRequestHeader("Accept" , "text/xml"); +post.addRequestHeader("Accept", "text/xml"); entity = new FileRequestEntity(input, "text/xml; charset=ISO-8859-1"); post.setRequestEntity(entity); httpclient = new HttpClient(); http://git-wip-us.apache.org/repos/asf/cxf/blob/aeecef53/distribution/src/main/release/samples/jax_rs/basic_https/src/main/java/httpsdemo/client/Client.java -- diff --git a/distribution/src/main/release/samples/jax_rs/basic_https/src/main/java/httpsdemo/client/Client.java b/distribution/src/main/release/samples/jax_rs/basic_https/src/main/java/httpsdemo/client/Client.java index 9bdb084..7147e2d 100644 --- a/distribution/src/main/release/samples/jax_rs/basic_https/src/main/java/httpsdemo/client/Client.java +++ b/distribution/src/main/release/samples/jax_rs/basic_https/src/main/java/httpsdemo/client/Client.java @@ -61,7 +61,7 @@ public final class Client { DefaultHttpClient httpclient = new DefaultHttpClient(); httpclient.getConnectionManager().getSchemeRegistry().register(httpsScheme); HttpGet httpget = new HttpGet(BASE_SERVICE_URL + "/123"); -BasicHeader bh = new BasicHeader("Accept" , "text/xml"); +BasicHeader bh = new BasicHeader("Accept", "text/xml"); httpget.addHeader(bh); HttpRe
cxf git commit: Fix oauth sample with spring securty 4.1
Repository: cxf Updated Branches: refs/heads/master 73e9c7424 -> ca2f8e811 Fix oauth sample with spring securty 4.1 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ca2f8e81 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ca2f8e81 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ca2f8e81 Branch: refs/heads/master Commit: ca2f8e81168b5b4ca72fa6c3c4529109c7d7c5d0 Parents: 73e9c74 Author: Daniel Kulp Authored: Fri Jun 10 15:04:14 2016 -0400 Committer: Daniel Kulp Committed: Fri Jun 10 15:04:14 2016 -0400 -- .../server/src/main/java/demo/oauth/server/CustomAuth.java| 4 .../oauth/server/spring/SpringOAuthAuthenticationFilter.java | 4 ++-- .../oauth/server/src/main/webapp/WEB-INF/security-beans.xml | 7 +-- 3 files changed, 11 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/ca2f8e81/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java -- diff --git a/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java b/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java index ca734ca..7a485a3 100644 --- a/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java +++ b/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java @@ -28,6 +28,10 @@ import org.springframework.security.web.authentication.LoginUrlAuthenticationEnt public class CustomAuth extends LoginUrlAuthenticationEntryPoint { +public CustomAuth(String v) { +super(v); +} + @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { http://git-wip-us.apache.org/repos/asf/cxf/blob/ca2f8e81/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/SpringOAuthAuthenticationFilter.java -- diff --git a/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/SpringOAuthAuthenticationFilter.java b/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/SpringOAuthAuthenticationFilter.java index f977912..09d3a5e 100644 --- a/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/SpringOAuthAuthenticationFilter.java +++ b/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/SpringOAuthAuthenticationFilter.java @@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.security.authentication.AnonymousAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.GrantedAuthorityImpl; +import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; public class SpringOAuthAuthenticationFilter implements Filter { @@ -53,7 +53,7 @@ public class SpringOAuthAuthenticationFilter implements Filter { if (authorities != null) { for (String authority : authorities) { -grantedAuthorities.add(new GrantedAuthorityImpl(authority)); +grantedAuthorities.add(new SimpleGrantedAuthority(authority)); } Authentication auth = new AnonymousAuthenticationToken(UUID.randomUUID().toString(), http://git-wip-us.apache.org/repos/asf/cxf/blob/ca2f8e81/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/security-beans.xml -- diff --git a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/security-beans.xml b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/security-beans.xml index 40da498..fe03d4b 100644 --- a/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/security-beans.xml +++ b/distribution/src/main/release/samples/oauth/server/src/main/webapp/WEB-INF/security-beans.xml @@ -17,7 +17,10 @@ specific language governing permissions and limitations under the License. --> -http://www.springframework.org/schema/security"; xmlns:beans="http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:context="http://www.springframework.org/schema/context"; xsi:schemaLocation="http://www.sp
[3/3] cxf git commit: Recording .gitmergeinfo Changes
Recording .gitmergeinfo Changes Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2e7e04b5 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2e7e04b5 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2e7e04b5 Branch: refs/heads/3.1.x-fixes Commit: 2e7e04b546c73daf61cf5b841db3a104d4fec2eb Parents: 0572061 Author: Daniel Kulp Authored: Fri Jun 10 13:35:34 2016 -0400 Committer: Daniel Kulp Committed: Fri Jun 10 13:35:34 2016 -0400 -- .gitmergeinfo | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/2e7e04b5/.gitmergeinfo -- diff --git a/.gitmergeinfo b/.gitmergeinfo index f079d71..ac3fdda 100644 --- a/.gitmergeinfo +++ b/.gitmergeinfo @@ -6,6 +6,7 @@ B 04d072e8494cb223c8f7b288776640dea68339d6 B 0d4cd0bbcaa6a4f80552d6b38f2a5e721ab20de9 B 0dfaf8d72574511ad9027c663707f9e30b945fbc B 111d52fd4b92d0222af9bf1c22156145ea01ed01 +B 1c3085ea94a902e6bf4a49b50c121e778efd28c2 B 22755d26ec2f6255004f57deec711ee68ce11d6c B 248c8f0458ce938a65c35006d484c6a4610cde1b B 2fb1ccf60f1ba4e9d70f8c2a6329fa1a65e6a352 @@ -70,6 +71,7 @@ B e6f0722615190861192972a51b3986b34efd1f0e B e824784db1bda81c68aaa407f471588acea38865 B ebce4a65b15a1a99f18c1ea0111affafc447ce7e B ec3103f88b20fc05e92994b6a06b65b4a91dd75a +B ecb6eba580c81d35991df66681db8dff99b1b087 B ee6ceea0d493b1b2dc6d83ca6923c3baed81885e B ee6e9e7d037de08ebc4a017ca7525d3ca67d2adb B efb1f0830f5441777198737fb26e9305ab969f66 @@ -83,6 +85,7 @@ B fb30f8bffc85fcc3208fcc0e1eda4b54a89b5d37 M 01d06cee06203b0ba616ca1924f1878aecc1a791 M 0222768baf6b60742c4a8332308edf2be0f4a2e4 M 0578e16146527b0782530c40ba2db17531756d96 +M 0865c3a85b9687f857b51d1ae56c8f8e97bdbf5b M 0e5fd5a54cb271ba494e7e30b45d4228b33364a9 M 1184e08f0d1c40c754e39fd5d6340d1057fbdd17 M 1afeea8bdc0ef96df1d52ea343957dc396723f8c @@ -94,6 +97,10 @@ M 2f8a1f7645c30cb40d4f080ce4b4099964028751 M 386805560479b35276d88605c5acf805e3004aa5 M 39c772a0764b323f98ab58e00345f4fca924c425 M 4799fef822a96f5d1b2827d5cc42ab886fd4e673 +M 4837a6cb5ea319f6bf87aaf3bf49c1e4e99e45a7 +M 4b0868a8ee6f53d8543860a458821c35ec2a79a2 +M 4f4ce80ba2de80219e13943cbd6edbf47234 +M 574b2a9997c94011794fa2e083181e23c9936f15 M 6242c682dfce4a2ba4869978c28b14f1472484c1 M 63a1088a9253da0452497440e900d35a5415c3c9 M 7304dfbd8f3044d8d46981abf2058c6cb732d219 @@ -105,6 +112,7 @@ M 896f1abec915897967905762d6e850cfb6bac3bc M 8aebfa30047f32e3a6b4feb7ffdd89208ec4f435 M 8e131133c8566a124605cb06e0b6db98fddb5972 M 8e650cfe3efd63a06c25b7e912d9d4db61598eb1 +M 8fbf0941ca52aac406b3efcf2e0d73436c72d0f1 M 9a9e0a8a37608195c4ef6fbf386728d13d025d2d M 9b816a21d8b85cc051be59a8ab6e968c5d0d M 9ecea375930d1a217f35da65e0d6073f7a80bf7d @@ -117,6 +125,7 @@ M b2e5fb6583d64deeb8a42d2eeb6935c5f33dc0c6 M c01c68ddda10ec6db492b86d818498bec0bf4228 M cf8ac102e728b8745da265ec969f7b5160829fdb M e578ea946aa13177adef98727e3e4606652ffc76 +M e6d42f6d6684feb46fc0bfbc0520ed13f0f002aa M e92e57c1f14de911cd2315a907443c79e91a94de M f9a42a528f4edfa7bcc62d5885eebaeb25224cec M fa973bd7ab43099151f83beea351b80c7140eaab
[1/3] cxf git commit: Use a "keys" classifier for the jar containing the test keys. Make sure that is build in package phase for -Pfastinstall to work.
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 2ceb8351e -> 2e7e04b54 Use a "keys" classifier for the jar containing the test keys. Make sure that is build in package phase for -Pfastinstall to work. # Conflicts: # systests/transport-undertow/pom.xml Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/83846d08 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/83846d08 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/83846d08 Branch: refs/heads/3.1.x-fixes Commit: 83846d088d78a03159b259fb9969052a33904faa Parents: 2ceb835 Author: Daniel Kulp Authored: Tue Jun 7 12:05:25 2016 -0400 Committer: Daniel Kulp Committed: Fri Jun 10 13:35:26 2016 -0400 -- services/sts/sts-core/pom.xml | 2 +- services/sts/systests/advanced/pom.xml | 2 +- services/sts/systests/basic/pom.xml| 2 +- services/xkms/xkms-client/pom.xml | 2 +- systests/jaxrs/pom.xml | 2 +- systests/kerberos/pom.xml | 2 +- systests/rs-security/pom.xml | 2 +- systests/transport-jms/pom.xml | 2 +- systests/transports-ssl3/pom.xml | 2 +- systests/transports/pom.xml| 2 +- systests/ws-rm/pom.xml | 2 +- systests/ws-security-examples/pom.xml | 2 +- systests/ws-security/pom.xml | 2 +- testutils/pom.xml | 14 ++ 14 files changed, 27 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/83846d08/services/sts/sts-core/pom.xml -- diff --git a/services/sts/sts-core/pom.xml b/services/sts/sts-core/pom.xml index ca941b2..04b9c22 100644 --- a/services/sts/sts-core/pom.xml +++ b/services/sts/sts-core/pom.xml @@ -145,7 +145,7 @@ cxf-testutils ${project.version} test -tests +keys http://git-wip-us.apache.org/repos/asf/cxf/blob/83846d08/services/sts/systests/advanced/pom.xml -- diff --git a/services/sts/systests/advanced/pom.xml b/services/sts/systests/advanced/pom.xml index c083aa6..55c9b1d 100644 --- a/services/sts/systests/advanced/pom.xml +++ b/services/sts/systests/advanced/pom.xml @@ -95,7 +95,7 @@ cxf-testutils ${project.version} test -tests +keys org.bouncycastle http://git-wip-us.apache.org/repos/asf/cxf/blob/83846d08/services/sts/systests/basic/pom.xml -- diff --git a/services/sts/systests/basic/pom.xml b/services/sts/systests/basic/pom.xml index 037ed7e..01b9a4b 100644 --- a/services/sts/systests/basic/pom.xml +++ b/services/sts/systests/basic/pom.xml @@ -89,7 +89,7 @@ cxf-testutils ${project.version} test -tests +keys org.apache.cxf http://git-wip-us.apache.org/repos/asf/cxf/blob/83846d08/services/xkms/xkms-client/pom.xml -- diff --git a/services/xkms/xkms-client/pom.xml b/services/xkms/xkms-client/pom.xml index 116e35d..30b5aae 100644 --- a/services/xkms/xkms-client/pom.xml +++ b/services/xkms/xkms-client/pom.xml @@ -106,7 +106,7 @@ cxf-testutils ${project.version} test -tests +keys org.slf4j http://git-wip-us.apache.org/repos/asf/cxf/blob/83846d08/systests/jaxrs/pom.xml -- diff --git a/systests/jaxrs/pom.xml b/systests/jaxrs/pom.xml index d5654e6..84567ed 100644 --- a/systests/jaxrs/pom.xml +++ b/systests/jaxrs/pom.xml @@ -300,7 +300,7 @@ cxf-testutils ${project.version} test -tests +keys org.apache.cxf http://git-wip-us.apache.org/repos/asf/cxf/blob/83846d08/systests/kerberos/pom.xml -- diff --git a/systests/kerberos/pom.xml b/systests/kerberos/pom.xml index 6e87c46..96796ae 100644 --- a/systests/kerberos/pom.xml +++ b/systests/kerberos/pom.xml @@ -168,7 +168,7 @@ cxf-testutils ${project.version} test -tests +keys org.springframework http://git-wip-us.apache.org/repos/asf/cxf/blob/83846d08/systests/rs-security/pom.xml -- diff --git a/systests/rs-security/pom.xml b/systests/rs-security/pom.xml index e755aed
[2/3] cxf git commit: Fix UDP tests on my mac
Fix UDP tests on my mac Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0572061e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0572061e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0572061e Branch: refs/heads/3.1.x-fixes Commit: 0572061edf5ab349dc61e77fbb8d360c7521d111 Parents: 83846d0 Author: Daniel Kulp Authored: Tue Jun 7 13:52:42 2016 -0400 Committer: Daniel Kulp Committed: Fri Jun 10 13:35:29 2016 -0400 -- .../cxf/transport/udp/UDPTransportTest.java | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/0572061e/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java -- diff --git a/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java b/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java index fea6ce1..9c0052c 100644 --- a/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java +++ b/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java @@ -22,12 +22,13 @@ package org.apache.cxf.transport.udp; import java.net.NetworkInterface; import java.util.Enumeration; +import javax.jws.WebService; + import org.apache.cxf.endpoint.Server; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.jaxws.JaxWsServerFactoryBean; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; import org.apache.hello_world.Greeter; -import org.apache.hello_world.GreeterImpl; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -40,6 +41,23 @@ public class UDPTransportTest extends AbstractBusClientServerTestBase { static final String PORT = allocatePort(UDPTransportTest.class); private static Server server; +@WebService(serviceName = "SOAPService", +endpointInterface = "org.apache.hello_world.Greeter", +targetNamespace = "http://apache.org/hello_world";) +static class GreeterImpl implements Greeter { +private String myName = "defaultGreeter"; +GreeterImpl() { +} +public String greetMe(String me) { +return "Hello " + me; +} +public String sayHi() { +return "Bonjour from " + myName; +} +public void pingMe() { +} +} + @BeforeClass public static void setUpBeforeClass() throws Exception { @@ -53,7 +71,9 @@ public class UDPTransportTest extends AbstractBusClientServerTestBase { @AfterClass public static void shutdown() throws Exception { -server.stop(); +if (server != null) { +server.stop(); +} } @Test
[1/2] cxf-fediz git commit: Adding some system tests for audience restriction
Repository: cxf-fediz Updated Branches: refs/heads/1.2.x-fixes b132fb846 -> d71f3286c Adding some system tests for audience restriction Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/219cb399 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/219cb399 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/219cb399 Branch: refs/heads/1.2.x-fixes Commit: 219cb3994d9fef1f99e4bbf62cd342a00840fd6f Parents: b132fb8 Author: Colm O hEigeartaigh Authored: Fri Jun 10 13:41:23 2016 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jun 10 13:41:50 2016 +0100 -- .../AudienceRestrictionTest.java| 210 +++ .../test/resources/fediz_config_aud_restr.xml | 61 ++ .../AudienceRestrictionTest.java| 210 +++ .../test/resources/fediz_config_aud_restr.xml | 61 ++ 4 files changed, 542 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/219cb399/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java -- diff --git a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java new file mode 100644 index 000..d9822cb --- /dev/null +++ b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java @@ -0,0 +1,210 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cxf.fediz.integrationtests; + + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; + +import javax.servlet.ServletException; + +import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; +import com.gargoylesoftware.htmlunit.WebClient; +import com.gargoylesoftware.htmlunit.html.HtmlForm; +import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; + +import org.apache.catalina.Context; +import org.apache.catalina.LifecycleException; +import org.apache.catalina.LifecycleState; +import org.apache.catalina.connector.Connector; +import org.apache.catalina.startup.Tomcat; +import org.apache.commons.io.IOUtils; +import org.apache.cxf.fediz.tomcat7.FederationAuthenticator; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; + +/** + * A test to make sure that audience restriction validation is working correctly in the plugin. + */ +public class AudienceRestrictionTest { + +static String idpHttpsPort; +static String rpHttpsPort; + +private static Tomcat idpServer; +private static Tomcat rpServer; + +@BeforeClass +public static void init() throws Exception { +System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); + System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); + System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info"); + +idpHttpsPort = System.getProperty("idp.https.port"); +Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort); +rpHttpsPort = System.getProperty("rp.https.port"); +
[2/2] cxf-fediz git commit: Fixing merge
Fixing merge Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/d71f3286 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/d71f3286 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/d71f3286 Branch: refs/heads/1.2.x-fixes Commit: d71f3286cd12e2540ee520a4d3f0611e74a4bfaa Parents: 219cb39 Author: Colm O hEigeartaigh Authored: Fri Jun 10 13:54:11 2016 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jun 10 13:54:11 2016 +0100 -- .../AudienceRestrictionTest.java| 10 +- .../AudienceRestrictionTest.java| 210 --- .../test/resources/fediz_config_aud_restr.xml | 61 -- 3 files changed, 4 insertions(+), 277 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d71f3286/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java -- diff --git a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java index d9822cb..654a4f6 100644 --- a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java +++ b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java @@ -39,7 +39,7 @@ import org.apache.catalina.LifecycleState; import org.apache.catalina.connector.Connector; import org.apache.catalina.startup.Tomcat; import org.apache.commons.io.IOUtils; -import org.apache.cxf.fediz.tomcat7.FederationAuthenticator; +import org.apache.cxf.fediz.tomcat.FederationAuthenticator; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.junit.AfterClass; @@ -129,9 +129,9 @@ public class AudienceRestrictionTest { content = content.replaceAll("\\$\\{idp.https.port\\}", "" + idpHttpsPort); File f2 = new File(baseDir + "/test-classes/fediz_config_aud_restr.xml"); -try (FileOutputStream outputStream = new FileOutputStream(f2)) { -IOUtils.write(content, outputStream, "UTF-8"); -} +FileOutputStream outputStream = new FileOutputStream(f2); +IOUtils.write(content, outputStream, "UTF-8"); +outputStream.close(); } FederationAuthenticator fa = new FederationAuthenticator(); @@ -203,8 +203,6 @@ public class AudienceRestrictionTest { } catch (FailingHttpStatusCodeException ex) { Assert.assertEquals(ex.getStatusCode(), 401); } - -webClient.close(); } } http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d71f3286/systests/tomcat8/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java -- diff --git a/systests/tomcat8/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java b/systests/tomcat8/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java deleted file mode 100644 index 673b868..000 --- a/systests/tomcat8/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.cxf.fediz.integrationtests; - - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -import javax.servlet.ServletException; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; - -import org.apache.catalina.Context; -import org.ap
cxf-fediz git commit: Adding some system tests for audience restriction
Repository: cxf-fediz Updated Branches: refs/heads/master 0006581e9 -> 374b33fa8 Adding some system tests for audience restriction Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/374b33fa Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/374b33fa Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/374b33fa Branch: refs/heads/master Commit: 374b33fa80070018e67f40db99e03a32c1cbaab9 Parents: 0006581 Author: Colm O hEigeartaigh Authored: Fri Jun 10 13:41:23 2016 +0100 Committer: Colm O hEigeartaigh Committed: Fri Jun 10 13:41:23 2016 +0100 -- .../AudienceRestrictionTest.java| 210 +++ .../test/resources/fediz_config_aud_restr.xml | 61 ++ .../AudienceRestrictionTest.java| 210 +++ .../test/resources/fediz_config_aud_restr.xml | 61 ++ 4 files changed, 542 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/374b33fa/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java -- diff --git a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java new file mode 100644 index 000..d9822cb --- /dev/null +++ b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/AudienceRestrictionTest.java @@ -0,0 +1,210 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cxf.fediz.integrationtests; + + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; + +import javax.servlet.ServletException; + +import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; +import com.gargoylesoftware.htmlunit.WebClient; +import com.gargoylesoftware.htmlunit.html.HtmlForm; +import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; + +import org.apache.catalina.Context; +import org.apache.catalina.LifecycleException; +import org.apache.catalina.LifecycleState; +import org.apache.catalina.connector.Connector; +import org.apache.catalina.startup.Tomcat; +import org.apache.commons.io.IOUtils; +import org.apache.cxf.fediz.tomcat7.FederationAuthenticator; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; + +/** + * A test to make sure that audience restriction validation is working correctly in the plugin. + */ +public class AudienceRestrictionTest { + +static String idpHttpsPort; +static String rpHttpsPort; + +private static Tomcat idpServer; +private static Tomcat rpServer; + +@BeforeClass +public static void init() throws Exception { +System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); + System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); + System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info"); + System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info"); + +idpHttpsPort = System.getProperty("idp.https.port"); +Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort); +rpHttpsPort = System.getProperty("rp.https.port"); +As