Author: jim.ma
Date: 2013-12-18 03:55:58 -0500 (Wed, 18 Dec 2013)
New Revision: 18201
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jaxws-endpoint-config.xml
Removed:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/
Modified:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java
Log:
More cleanup and refactor
Modified:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java
===================================================================
---
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java 2013-12-18
03:54:30 UTC (rev 18200)
+++
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java 2013-12-18
08:55:58 UTC (rev 18201)
@@ -33,34 +33,36 @@
/**
* @author <a href="ema(a)redhat.com">Jim Ma</a>
*/
-public class JBossWSAuthConfigProvider implements AuthConfigProvider {
- private Properties contextProperties;
-
- public JBossWSAuthConfigProvider(Properties props, AuthConfigFactory factory) {
- contextProperties = props;
- if (factory != null) {
- factory.registerConfigProvider(this, "soap", null,"JBossWS
AuthConfigProvider");
- }
+public class JBossWSAuthConfigProvider implements AuthConfigProvider
+{
+ private Properties contextProperties;
- }
-
- @Override
- public ClientAuthConfig getClientAuthConfig(String layer,
- String appContext, CallbackHandler handler) throws AuthException, SecurityException {
- return new JBossWSClientAuthConfig(layer, appContext, handler, contextProperties);
- }
+ public JBossWSAuthConfigProvider(Properties props, AuthConfigFactory factory)
+ {
+ contextProperties = props;
+ if (factory != null)
+ {
+ factory.registerConfigProvider(this, "soap", null, "JBossWS
AuthConfigProvider");
+ }
- @Override
- public ServerAuthConfig getServerAuthConfig(String layer,
- String appContext, CallbackHandler handler) throws AuthException,
- SecurityException {
- return new JBossWSServerAuthConfig(layer, appContext, handler, contextProperties);
- }
+ }
- @Override
- public void refresh() {
-
-
- }
-
+ @Override
+ public ClientAuthConfig getClientAuthConfig(String layer, String appContext,
CallbackHandler handler) throws AuthException, SecurityException
+ {
+ return new JBossWSClientAuthConfig(layer, appContext, handler, contextProperties);
+ }
+
+ @Override
+ public ServerAuthConfig getServerAuthConfig(String layer, String appContext,
CallbackHandler handler) throws AuthException, SecurityException
+ {
+ return new JBossWSServerAuthConfig(layer, appContext, handler, contextProperties);
+ }
+
+ @Override
+ public void refresh()
+ {
+
+ }
+
}
\ No newline at end of file
Modified:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java
===================================================================
---
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java 2013-12-18
03:54:30 UTC (rev 18200)
+++
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java 2013-12-18
08:55:58 UTC (rev 18201)
@@ -20,11 +20,12 @@
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
package org.jboss.wsf.stack.cxf.jaspi.config;
+
/**
* @author <a href="ema(a)redhat.com">Jim Ma</a>
*/
-public class JBossWSAuthConstants {
- public static final String WSS4J_CONFIG = "wss4j.config";
- public static final String SOAP_LAYER = "soap";
+public class JBossWSAuthConstants
+{
+ public static final String SOAP_LAYER = "soap";
}
Modified:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java
===================================================================
---
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java 2013-12-18
03:54:30 UTC (rev 18200)
+++
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java 2013-12-18
08:55:58 UTC (rev 18201)
@@ -32,8 +32,6 @@
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.message.AuthException;
import javax.security.auth.message.MessageInfo;
-import javax.security.auth.message.config.AuthConfig;
-import javax.security.auth.message.config.ServerAuthConfig;
import javax.security.auth.message.config.ServerAuthContext;
import javax.security.auth.message.module.ServerAuthModule;
import javax.xml.namespace.QName;
@@ -50,29 +48,22 @@
import org.jboss.security.auth.callback.JBossCallbackHandler;
import org.jboss.security.auth.container.config.AuthModuleEntry;
import org.jboss.security.auth.login.JASPIAuthenticationInfo;
+import org.jboss.security.auth.message.config.JBossServerAuthConfig;
import org.jboss.security.config.ControlFlag;
import org.jboss.security.plugins.ClassLoaderLocator;
import org.jboss.security.plugins.ClassLoaderLocatorFactory;
/**
* @author <a href="ema(a)redhat.com">Jim Ma</a>
*/
-//TODO: Refactor JBossServerAuthConfig, this class should extend JBossServerAuthConfig,
-public class JBossWSServerAuthConfig implements ServerAuthConfig {
- private String layer;
- private String appContextId;
+public class JBossWSServerAuthConfig extends JBossServerAuthConfig {
private CallbackHandler callbackHandler = new JBossCallbackHandler();
@SuppressWarnings("rawtypes")
private List modules = new ArrayList();
- @SuppressWarnings({"rawtypes" })
- private Map contextProperties;
@SuppressWarnings("rawtypes")
public JBossWSServerAuthConfig(String layer, String appContext,
CallbackHandler handler, Map properties) {
- this.layer = layer;
- this.appContextId = appContext;
- this.callbackHandler = handler;
- this.contextProperties = properties;
+ super(layer, appContext, handler, properties);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@@ -141,32 +132,6 @@
return serverAuthContext;
}
- /**
- * @see AuthConfig#getAppContext()
- */
- public String getAppContext() {
- return this.appContextId;
- }
-
- /**
- * @see AuthConfig#getMessageLayer()
- */
- public String getMessageLayer() {
- return this.layer;
- }
-
- /**
- * @see AuthConfig#refresh()
- */
- public void refresh() {
- }
-
- // Custom Methods
- @SuppressWarnings({ "rawtypes" })
- public List getServerAuthModules() {
- return this.modules;
- }
-
@SuppressWarnings("rawtypes")
public String getAuthContextID(MessageInfo messageInfo)
{
Modified:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2013-12-18
03:54:30 UTC (rev 18200)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2013-12-18
08:55:58 UTC (rev 18201)
@@ -553,7 +553,8 @@
<include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
</classes>
<webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaspi/WEB-INF">
- <include name="jboss-*.xml"/>
+ <!--include name="jboss-*.xml"/-->
+ <include name="jaxws-*.xml"/>
<include name="wsdl/*"/>
</webinf>
<manifest>
Modified:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java 2013-12-18
03:54:30 UTC (rev 18200)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/BusHolderLifeCycleTestCase.java 2013-12-18
08:55:58 UTC (rev 18201)
@@ -26,6 +26,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.buslifecycle.BusLifeCycleListener;
import org.apache.cxf.buslifecycle.BusLifeCycleManager;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
import org.jboss.wsf.stack.cxf.configuration.BusHolder;
import org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder;
Modified:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java 2013-12-18
03:54:30 UTC (rev 18200)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java 2013-12-18
08:55:58 UTC (rev 18201)
@@ -23,6 +23,8 @@
import javax.jws.WebService;
+import org.jboss.ws.api.annotation.EndpointConfig;
+
@WebService
(
portName = "SecurityServicePort",
@@ -31,6 +33,8 @@
targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
endpointInterface =
"org.jboss.test.ws.jaxws.samples.wsse.policy.jaspi.ServiceIface"
)
+@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName =
"jaspiSecurityDomain")
+
public class ServiceImpl implements ServiceIface
{
public String sayHello()
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jaxws-endpoint-config.xml
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jaxws-endpoint-config.xml
(rev 0)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jaxws-endpoint-config.xml 2013-12-18
08:55:58 UTC (rev 18201)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0
schema/jbossws-jaxws-config_4_0.xsd">
+ <endpoint-config>
+ <config-name>jaspiSecurityDomain</config-name>
+ <property>
+ <property-name>jaspi.security.domain</property-name>
+ <property-value>jaspi</property-value>
+ </property>
+ </endpoint-config>
+</jaxws-config>
\ No newline at end of file
Property changes on:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jaxws-endpoint-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native