You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/08/04 19:35:10 UTC
[10/12] cxf git commit: Fix static references to appropraite class
http://git-wip-us.apache.org/repos/asf/cxf/blob/a5dd7fa0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
index 9d9e242..aa10704 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
@@ -39,7 +39,6 @@ import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.stax.ext.WSSConstants;
import org.apache.wss4j.stax.ext.WSSSecurityProperties;
import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
@@ -58,9 +57,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -85,7 +84,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// Negative test for wrong password type
service.getInInterceptors().remove(inInterceptor);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -108,9 +107,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -134,7 +133,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// Negative test for wrong password type
service.getInInterceptors().remove(inInterceptor);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -156,9 +155,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -183,7 +182,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// Negative test for wrong password type
service.getInInterceptors().remove(inInterceptor);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -205,9 +204,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -231,7 +230,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// Negative test for wrong password type
service.getInInterceptors().remove(inInterceptor);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -253,9 +252,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -289,9 +288,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -321,9 +320,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -356,7 +355,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// expected
}
- inProperties.put(WSHandlerConstants.ALLOW_RSA15_KEY_TRANSPORT_ALGORITHM, "true");
+ inProperties.put(ConfigurationConstants.ALLOW_RSA15_KEY_TRANSPORT_ALGORITHM, "true");
assertEquals("test", echo.echo("test"));
}
@@ -366,9 +365,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -404,7 +403,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// expected
}
- inProperties.put(WSHandlerConstants.ALLOW_RSA15_KEY_TRANSPORT_ALGORITHM, "true");
+ inProperties.put(ConfigurationConstants.ALLOW_RSA15_KEY_TRANSPORT_ALGORITHM, "true");
assertEquals("test", echo.echo("test"));
}
@@ -415,11 +414,11 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.ENCRYPT
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -459,11 +458,11 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.ENCRYPT
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -501,9 +500,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -536,9 +535,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -568,11 +567,11 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.USERNAME_TOKEN
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -615,11 +614,11 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.USERNAME_TOKEN
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.USERNAME_TOKEN
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -657,7 +656,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP);
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -680,7 +679,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// Negative test for no Timestamp
service.getInInterceptors().remove(inInterceptor);
- inProperties.put(WSHandlerConstants.ACTION, "");
+ inProperties.put(ConfigurationConstants.ACTION, "");
inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -702,7 +701,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP);
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -723,7 +722,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
// Negative test for no Timestamp
service.getInInterceptors().remove(inInterceptor);
- inProperties.put(WSHandlerConstants.ACTION, "");
+ inProperties.put(ConfigurationConstants.ACTION, "");
inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -746,11 +745,11 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.TIMESTAMP
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -791,11 +790,11 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.TIMESTAMP
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -833,11 +832,11 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.TIMESTAMP
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.TIMESTAMP
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -882,9 +881,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new KeystorePasswordCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "cxfca.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new KeystorePasswordCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "cxfca.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -922,9 +921,9 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new KeystorePasswordCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "cxfca.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new KeystorePasswordCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "cxfca.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -956,12 +955,12 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPT
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -999,12 +998,12 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPT
);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -1039,18 +1038,18 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
Map<String, Object> outProperties = new HashMap<>();
- outProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- outProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- outProperties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- outProperties.put(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION, "true");
- outProperties.put(WSHandlerConstants.USER, "myalias");
+ outProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ outProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ outProperties.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ outProperties.put(ConfigurationConstants.ENABLE_SIGNATURE_CONFIRMATION, "true");
+ outProperties.put(ConfigurationConstants.USER, "myalias");
WSS4JOutInterceptor domOhandler = new WSS4JOutInterceptor(outProperties);
service.getOutInterceptors().add(domOhandler);
@@ -1093,18 +1092,18 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
Map<String, Object> outProperties = new HashMap<>();
- outProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- outProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- outProperties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- outProperties.put(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION, "true");
- outProperties.put(WSHandlerConstants.USER, "myalias");
+ outProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ outProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ outProperties.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ outProperties.put(ConfigurationConstants.ENABLE_SIGNATURE_CONFIRMATION, "true");
+ outProperties.put(ConfigurationConstants.USER, "myalias");
WSS4JOutInterceptor domOhandler = new WSS4JOutInterceptor(outProperties);
service.getOutInterceptors().add(domOhandler);
http://git-wip-us.apache.org/repos/asf/cxf/blob/a5dd7fa0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
index 6322245..f2d987b 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
@@ -33,8 +33,8 @@ import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.service.Service;
import org.apache.cxf.transport.local.LocalTransportFactory;
+import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.common.crypto.CryptoFactory;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.stax.ext.WSSConstants;
import org.apache.wss4j.stax.ext.WSSSecurityProperties;
import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
@@ -53,9 +53,9 @@ public class StaxToDOMSignatureIdentifierTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -91,9 +91,9 @@ public class StaxToDOMSignatureIdentifierTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -129,9 +129,9 @@ public class StaxToDOMSignatureIdentifierTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -167,10 +167,10 @@ public class StaxToDOMSignatureIdentifierTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
- inProperties.put(WSHandlerConstants.IS_BSP_COMPLIANT, "false");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.IS_BSP_COMPLIANT, "false");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
@@ -206,10 +206,10 @@ public class StaxToDOMSignatureIdentifierTest extends AbstractSecurityTest {
Service service = createService();
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
- inProperties.put(WSHandlerConstants.IS_BSP_COMPLIANT, "false");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.IS_BSP_COMPLIANT, "false");
WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
service.getInInterceptors().add(inInterceptor);
http://git-wip-us.apache.org/repos/asf/cxf/blob/a5dd7fa0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/UserNameTokenAuthorizationTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/UserNameTokenAuthorizationTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/UserNameTokenAuthorizationTest.java
index 0335a48..a0242fd 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/UserNameTokenAuthorizationTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/UserNameTokenAuthorizationTest.java
@@ -35,8 +35,8 @@ import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.service.Service;
import org.apache.cxf.transport.local.LocalConduit;
import org.apache.cxf.transport.local.LocalTransportFactory;
+import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.junit.Test;
@@ -63,9 +63,9 @@ public class UserNameTokenAuthorizationTest extends AbstractSecurityTest {
wsIn = new SimpleSubjectCreatingInterceptor();
wsIn.setSupportDigestPasswords(digest);
- wsIn.setProperty(WSHandlerConstants.SIG_PROP_FILE, "insecurity.properties");
- wsIn.setProperty(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
- wsIn.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
+ wsIn.setProperty(ConfigurationConstants.SIG_PROP_FILE, "insecurity.properties");
+ wsIn.setProperty(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
+ wsIn.setProperty(ConfigurationConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
service.getInInterceptors().add(wsIn);
@@ -75,23 +75,23 @@ public class UserNameTokenAuthorizationTest extends AbstractSecurityTest {
wsOut = new WSS4JOutInterceptor();
- wsOut.setProperty(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- wsOut.setProperty(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties");
- wsOut.setProperty(WSHandlerConstants.USER, "myalias");
+ wsOut.setProperty(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ wsOut.setProperty(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+ wsOut.setProperty(ConfigurationConstants.USER, "myalias");
if (digest) {
wsOut.setProperty("password", "myAliasPassword");
} else {
- wsOut.setProperty(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ wsOut.setProperty(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
}
if (encryptUsernameTokenOnly) {
- wsOut.setProperty(WSHandlerConstants.ENCRYPTION_USER, "myalias");
+ wsOut.setProperty(ConfigurationConstants.ENCRYPTION_USER, "myalias");
wsOut.setProperty(
- WSHandlerConstants.ENCRYPTION_PARTS,
+ ConfigurationConstants.ENCRYPTION_PARTS,
"{Content}{" + WSConstants.WSSE_NS + "}UsernameToken"
);
}
- wsOut.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
+ wsOut.setProperty(ConfigurationConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
service.getOutInterceptors().add(wsOut);
// Create the client
@@ -119,12 +119,12 @@ public class UserNameTokenAuthorizationTest extends AbstractSecurityTest {
@Test
public void testDigestPasswordAuthorized() throws Exception {
setUpService("developers", true, false);
- String actions = WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.SIGNATURE + " "
- + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.USERNAME_TOKEN;
+ String actions = ConfigurationConstants.ENCRYPT + " " + ConfigurationConstants.SIGNATURE + " "
+ + ConfigurationConstants.TIMESTAMP + " " + ConfigurationConstants.USERNAME_TOKEN;
- wsIn.setProperty(WSHandlerConstants.ACTION, actions);
+ wsIn.setProperty(ConfigurationConstants.ACTION, actions);
- wsOut.setProperty(WSHandlerConstants.ACTION, actions);
+ wsOut.setProperty(ConfigurationConstants.ACTION, actions);
assertEquals("test", echo.echo("test"));
}
@@ -132,12 +132,12 @@ public class UserNameTokenAuthorizationTest extends AbstractSecurityTest {
@Test
public void testDigestPasswordUnauthorized() throws Exception {
setUpService("managers", true, false);
- String actions = WSHandlerConstants.ENCRYPT + " " + WSHandlerConstants.SIGNATURE + " "
- + WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.USERNAME_TOKEN;
+ String actions = ConfigurationConstants.ENCRYPT + " " + ConfigurationConstants.SIGNATURE + " "
+ + ConfigurationConstants.TIMESTAMP + " " + ConfigurationConstants.USERNAME_TOKEN;
- wsIn.setProperty(WSHandlerConstants.ACTION, actions);
+ wsIn.setProperty(ConfigurationConstants.ACTION, actions);
- wsOut.setProperty(WSHandlerConstants.ACTION, actions);
+ wsOut.setProperty(ConfigurationConstants.ACTION, actions);
try {
echo.echo("test");
@@ -150,10 +150,10 @@ public class UserNameTokenAuthorizationTest extends AbstractSecurityTest {
@Test
public void testEncryptedDigestPasswordAuthorized() throws Exception {
setUpService("developers", true, true);
- String actions = WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.ENCRYPT;
+ String actions = ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT;
- wsIn.setProperty(WSHandlerConstants.ACTION, actions);
- wsOut.setProperty(WSHandlerConstants.ACTION, actions);
+ wsIn.setProperty(ConfigurationConstants.ACTION, actions);
+ wsOut.setProperty(ConfigurationConstants.ACTION, actions);
assertEquals("test", echo.echo("test"));
}
@@ -161,10 +161,10 @@ public class UserNameTokenAuthorizationTest extends AbstractSecurityTest {
@Test
public void testClearPasswordAuthorized() throws Exception {
setUpService("developers", false, false);
- String actions = WSHandlerConstants.USERNAME_TOKEN;
+ String actions = ConfigurationConstants.USERNAME_TOKEN;
- wsIn.setProperty(WSHandlerConstants.ACTION, actions);
- wsOut.setProperty(WSHandlerConstants.ACTION, actions);
+ wsIn.setProperty(ConfigurationConstants.ACTION, actions);
+ wsOut.setProperty(ConfigurationConstants.ACTION, actions);
assertEquals("test", echo.echo("test"));
}
@@ -172,10 +172,10 @@ public class UserNameTokenAuthorizationTest extends AbstractSecurityTest {
@Test
public void testEncyptedClearPasswordAuthorized() throws Exception {
setUpService("developers", false, true);
- String actions = WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.ENCRYPT;
+ String actions = ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT;
- wsIn.setProperty(WSHandlerConstants.ACTION, actions);
- wsOut.setProperty(WSHandlerConstants.ACTION, actions);
+ wsIn.setProperty(ConfigurationConstants.ACTION, actions);
+ wsOut.setProperty(ConfigurationConstants.ACTION, actions);
assertEquals("test", echo.echo("test"));
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/a5dd7fa0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
index a9d0ce3..68a0ea9 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
@@ -38,8 +38,8 @@ import org.apache.cxf.message.MessageImpl;
import org.apache.cxf.phase.PhaseInterceptor;
import org.apache.cxf.staxutils.StaxUtils;
import org.apache.cxf.ws.security.SecurityConstants;
+import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.junit.Test;
@@ -83,9 +83,9 @@ public class WSS4JFaultCodeTest extends AbstractSecurityTest {
ex.setInMessage(inmsg);
inmsg.setContent(SOAPMessage.class, saajMsg);
- inHandler.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- inHandler.setProperty(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
- inHandler.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
+ inHandler.setProperty(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ inHandler.setProperty(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
+ inHandler.setProperty(ConfigurationConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
inmsg.put(SecurityConstants.RETURN_SECURITY_ERROR, Boolean.TRUE);
@@ -112,8 +112,8 @@ public class WSS4JFaultCodeTest extends AbstractSecurityTest {
SoapMessage msg = getSoapMessageForDom(doc);
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
- msg.put(WSHandlerConstants.TTL_TIMESTAMP, "1");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP);
+ msg.put(ConfigurationConstants.TTL_TIMESTAMP, "1");
handler.handleMessage(msg);
@@ -143,8 +143,8 @@ public class WSS4JFaultCodeTest extends AbstractSecurityTest {
ex.setInMessage(inmsg);
inmsg.setContent(SOAPMessage.class, saajMsg);
- inHandler.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
- inHandler.setProperty(WSHandlerConstants.TTL_TIMESTAMP, "1");
+ inHandler.setProperty(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP);
+ inHandler.setProperty(ConfigurationConstants.TTL_TIMESTAMP, "1");
inmsg.put(SecurityConstants.RETURN_SECURITY_ERROR, Boolean.TRUE);
try {
@@ -173,7 +173,7 @@ public class WSS4JFaultCodeTest extends AbstractSecurityTest {
SoapMessage msg = getSoapMessageForDom(doc);
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP);
handler.handleMessage(msg);
@@ -203,9 +203,9 @@ public class WSS4JFaultCodeTest extends AbstractSecurityTest {
ex.setInMessage(inmsg);
inmsg.setContent(SOAPMessage.class, saajMsg);
- inHandler.setProperty(WSHandlerConstants.ACTION,
- WSHandlerConstants.TIMESTAMP + " " + WSHandlerConstants.USERNAME_TOKEN);
- inHandler.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
+ inHandler.setProperty(ConfigurationConstants.ACTION,
+ ConfigurationConstants.TIMESTAMP + " " + ConfigurationConstants.USERNAME_TOKEN);
+ inHandler.setProperty(ConfigurationConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
inmsg.put(SecurityConstants.RETURN_SECURITY_ERROR, Boolean.TRUE);
@@ -250,13 +250,13 @@ public class WSS4JFaultCodeTest extends AbstractSecurityTest {
ex.setInMessage(inmsg);
inmsg.setContent(SOAPMessage.class, saajMsg);
- inHandler.setProperty(WSHandlerConstants.ACTION,
- WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT);
- inHandler.setProperty(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
- inHandler.setProperty(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
- inHandler.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
+ inHandler.setProperty(ConfigurationConstants.ACTION,
+ ConfigurationConstants.SIGNATURE + " " + ConfigurationConstants.ENCRYPT);
+ inHandler.setProperty(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
+ inHandler.setProperty(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inHandler.setProperty(ConfigurationConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
inHandler.setProperty(
- WSHandlerConstants.PW_CALLBACK_CLASS,
+ ConfigurationConstants.PW_CALLBACK_CLASS,
"org.apache.cxf.ws.security.wss4j.TestPwdCallback"
);
http://git-wip-us.apache.org/repos/asf/cxf/blob/a5dd7fa0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
index aeb34e2..238c620 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
@@ -51,6 +51,7 @@ import org.apache.cxf.phase.PhaseInterceptor;
import org.apache.cxf.phase.PhaseInterceptorChain;
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDataRef;
@@ -88,14 +89,14 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
@Test
public void testSignature() throws Exception {
Map<String, Object> outProperties = new HashMap<>();
- outProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- outProperties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- outProperties.put(WSHandlerConstants.USER, "myalias");
+ outProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ outProperties.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ outProperties.put(ConfigurationConstants.USER, "myalias");
outProperties.put("password", "myAliasPassword");
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
List<String> xpaths = new ArrayList<>();
xpaths.add("//wsse:Security");
@@ -114,15 +115,15 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
@Test
public void testDirectReferenceSignature() throws Exception {
Map<String, Object> outProperties = new HashMap<>();
- outProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- outProperties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- outProperties.put(WSHandlerConstants.USER, "myalias");
- outProperties.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
+ outProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ outProperties.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ outProperties.put(ConfigurationConstants.USER, "myalias");
+ outProperties.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
outProperties.put("password", "myAliasPassword");
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
List<String> xpaths = new ArrayList<>();
xpaths.add("//wsse:Security");
@@ -142,15 +143,15 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
@Test
public void testEncryption() throws Exception {
Map<String, Object> outProperties = new HashMap<>();
- outProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- outProperties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties");
- outProperties.put(WSHandlerConstants.USER, "myalias");
+ outProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ outProperties.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+ outProperties.put(ConfigurationConstants.USER, "myalias");
outProperties.put("password", "myAliasPassword");
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
List<String> xpaths = new ArrayList<>();
xpaths.add("//wsse:Security");
@@ -191,25 +192,25 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
public void testEncryptedUsernameToken() throws Exception {
Map<String, Object> outProperties = new HashMap<>();
outProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.ENCRYPT
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT
);
- outProperties.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties");
- outProperties.put(WSHandlerConstants.USER, "alice");
+ outProperties.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+ outProperties.put(ConfigurationConstants.USER, "alice");
outProperties.put("password", "alicePassword");
- outProperties.put(WSHandlerConstants.ENCRYPTION_USER, "myalias");
+ outProperties.put(ConfigurationConstants.ENCRYPTION_USER, "myalias");
outProperties.put(
- WSHandlerConstants.ENCRYPTION_PARTS,
+ ConfigurationConstants.ENCRYPTION_PARTS,
"{Content}{" + WSConstants.WSSE_NS + "}UsernameToken"
);
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.ENCRYPT
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.ENCRYPT
);
- inProperties.put(WSHandlerConstants.DEC_PROP_FILE, "insecurity.properties");
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.DEC_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
List<String> xpaths = new ArrayList<>();
xpaths.add("//wsse:Security");
@@ -242,15 +243,15 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
@Test
public void testUsernameToken() throws Exception {
Map<String, Object> outProperties = new HashMap<>();
- outProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- outProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
- outProperties.put(WSHandlerConstants.USER, "alice");
+ outProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ outProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ outProperties.put(ConfigurationConstants.USER, "alice");
outProperties.put("password", "alicePassword");
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
- inProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new TestPwdCallback());
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
+ inProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
List<String> xpaths = new ArrayList<>();
xpaths.add("//wsse:Security");
@@ -275,9 +276,9 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
SoapMessage msg = getSoapMessageForDom(doc);
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "myalias");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "myalias");
msg.put("password", "myAliasPassword");
handler.handleMessage(msg);
@@ -314,7 +315,7 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
ex.setInMessage(inmsg);
inmsg.setContent(SOAPMessage.class, saajMsg);
- inHandler.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.NO_SECURITY);
+ inHandler.setProperty(ConfigurationConstants.ACTION, WSHandlerConstants.NO_SECURITY);
inHandler.handleMessage(inmsg);
@@ -334,9 +335,9 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
SoapMessage msg = getSoapMessageForDom(doc);
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "myalias");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "myalias");
msg.put("password", "myAliasPassword");
handler.handleMessage(msg);
@@ -381,7 +382,7 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
ex.setInMessage(inmsg);
inmsg.setContent(SOAPMessage.class, saajMsg);
- inHandler.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
+ inHandler.setProperty(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
inHandler.handleMessage(inmsg);
@@ -399,16 +400,16 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
@Test
public void testPKIPath() throws Exception {
Map<String, Object> outProperties = new HashMap<>();
- outProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- outProperties.put(WSHandlerConstants.USER, "alice");
- outProperties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties");
- outProperties.put(WSHandlerConstants.PW_CALLBACK_REF, new KeystorePasswordCallback());
- outProperties.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
- outProperties.put(WSHandlerConstants.USE_SINGLE_CERTIFICATE, "false");
+ outProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ outProperties.put(ConfigurationConstants.USER, "alice");
+ outProperties.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
+ outProperties.put(ConfigurationConstants.PW_CALLBACK_REF, new KeystorePasswordCallback());
+ outProperties.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+ outProperties.put(ConfigurationConstants.USE_SINGLE_CERTIFICATE, "false");
Map<String, Object> inProperties = new HashMap<>();
- inProperties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "cxfca.properties");
+ inProperties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "cxfca.properties");
List<String> xpaths = new ArrayList<>();
xpaths.add("//wsse:Security");
@@ -429,29 +430,29 @@ public class WSS4JInOutTest extends AbstractSecurityTest {
public void testUsernameTokenSignature() throws Exception {
Map<String, Object> outProperties = new HashMap<>();
outProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.SIGNATURE);
- outProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
- outProperties.put(WSHandlerConstants.USER, "alice");
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.SIGNATURE);
+ outProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ outProperties.put(ConfigurationConstants.USER, "alice");
- outProperties.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- outProperties.put(WSHandlerConstants.SIGNATURE_USER, "myalias");
+ outProperties.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ outProperties.put(ConfigurationConstants.SIGNATURE_USER, "myalias");
outProperties.put(
- WSHandlerConstants.PW_CALLBACK_CLASS,
+ ConfigurationConstants.PW_CALLBACK_CLASS,
"org.apache.cxf.ws.security.wss4j.TestPwdCallback"
);
Map<String, Object> inProperties = new HashMap<>();
inProperties.put(
- WSHandlerConstants.ACTION,
- WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.SIGNATURE
+ ConfigurationConstants.ACTION,
+ ConfigurationConstants.USERNAME_TOKEN + " " + ConfigurationConstants.SIGNATURE
);
- inProperties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ inProperties.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
inProperties.put(
- WSHandlerConstants.PW_CALLBACK_CLASS,
+ ConfigurationConstants.PW_CALLBACK_CLASS,
"org.apache.cxf.ws.security.wss4j.TestPwdCallback"
);
- inProperties.put(WSHandlerConstants.SIG_VER_PROP_FILE, "insecurity.properties");
+ inProperties.put(ConfigurationConstants.SIG_VER_PROP_FILE, "insecurity.properties");
List<String> xpaths = new ArrayList<>();
xpaths.add("//wsse:Security");
http://git-wip-us.apache.org/repos/asf/cxf/blob/a5dd7fa0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptorTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptorTest.java
index 46339f8..d59438e 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptorTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptorTest.java
@@ -28,13 +28,13 @@ import org.w3c.dom.Document;
import org.apache.cxf.binding.soap.SoapFault;
import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.phase.PhaseInterceptor;
+import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.common.SecurityActionToken;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.action.UsernameTokenAction;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.handler.WSHandler;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.junit.Test;
public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
@@ -47,11 +47,11 @@ public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor();
PhaseInterceptor<SoapMessage> handler = ohandler.createEndingInterceptor();
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "username");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "username");
msg.put("password", "myAliasPassword");
- msg.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ msg.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
handler.handleMessage(msg);
doc = msg.getContent(SOAPMessage.class).getSOAPPart();
@@ -70,11 +70,11 @@ public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor();
PhaseInterceptor<SoapMessage> handler = ohandler.createEndingInterceptor();
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "username");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "username");
msg.put("password", "myAliasPassword");
- msg.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
+ msg.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
handler.handleMessage(msg);
doc = msg.getContent(SOAPMessage.class).getSOAPPart();
@@ -93,10 +93,10 @@ public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor();
PhaseInterceptor<SoapMessage> handler = ohandler.createEndingInterceptor();
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT);
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.ENC_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "myalias");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "myalias");
msg.put("password", "myAliasPassword");
handler.handleMessage(msg);
@@ -114,9 +114,9 @@ public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor();
PhaseInterceptor<SoapMessage> handler = ohandler.createEndingInterceptor();
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.SIGNATURE);
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "myAlias");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.SIGNATURE);
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "myAlias");
msg.put("password", "myAliasPassword");
handler.handleMessage(msg);
@@ -134,9 +134,9 @@ public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor();
PhaseInterceptor<SoapMessage> handler = ohandler.createEndingInterceptor();
- ohandler.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.TIMESTAMP);
- ohandler.setProperty(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "myalias");
+ ohandler.setProperty(ConfigurationConstants.ACTION, ConfigurationConstants.TIMESTAMP);
+ ohandler.setProperty(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "myalias");
msg.put("password", "myAliasPassword");
handler.handleMessage(msg);
@@ -158,11 +158,11 @@ public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
Map<Object, Object> customActions = new HashMap<>(1);
customActions.put(WSConstants.UT, action);
- msg.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "username");
+ msg.put(ConfigurationConstants.ACTION, ConfigurationConstants.USERNAME_TOKEN);
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "username");
msg.put("password", "myAliasPassword");
- msg.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ msg.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
msg.put(WSS4JOutInterceptor.WSS4J_ACTION_MAP, customActions);
handler.handleMessage(msg);
@@ -202,11 +202,11 @@ public class WSS4JOutInterceptorTest extends AbstractSecurityTest {
Map<Object, Object> customActions = new HashMap<>(1);
customActions.put(12345, action);
- msg.put(WSHandlerConstants.ACTION, "12345");
- msg.put(WSHandlerConstants.SIG_PROP_FILE, "outsecurity.properties");
- msg.put(WSHandlerConstants.USER, "username");
+ msg.put(ConfigurationConstants.ACTION, "12345");
+ msg.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
+ msg.put(ConfigurationConstants.USER, "username");
msg.put("password", "myAliasPassword");
- msg.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ msg.put(ConfigurationConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
msg.put(WSS4JOutInterceptor.WSS4J_ACTION_MAP, customActions);
handler.handleMessage(msg);
http://git-wip-us.apache.org/repos/asf/cxf/blob/a5dd7fa0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/DOMToStaxSamlTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/DOMToStaxSamlTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/DOMToStaxSamlTest.java
index 2fba85e..3afb585 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/DOMToStaxSamlTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/DOMToStaxSamlTest.java
@@ -36,11 +36,11 @@ import org.apache.cxf.ws.security.wss4j.Echo;
import org.apache.cxf.ws.security.wss4j.EchoImpl;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JStaxInInterceptor;
+import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.common.crypto.CryptoFactory;
import org.apache.wss4j.common.saml.builder.SAML1Constants;
import org.apache.wss4j.common.saml.builder.SAML2Constants;
import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
import org.apache.wss4j.stax.ext.WSSSecurityProperties;
import org.junit.Test;
@@ -68,9 +68,9 @@ public class DOMToStaxSamlTest extends AbstractSecurityTest {
client.getOutInterceptors().add(new LoggingOutInterceptor());
Map<String, Object> properties = new HashMap<>();
- properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SAML_TOKEN_UNSIGNED);
+ properties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_UNSIGNED);
properties.put(
- WSHandlerConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler()
+ ConfigurationConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler()
);
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
@@ -99,13 +99,13 @@ public class DOMToStaxSamlTest extends AbstractSecurityTest {
client.getOutInterceptors().add(new LoggingOutInterceptor());
Map<String, Object> properties = new HashMap<>();
- properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SAML_TOKEN_SIGNED);
- properties.put(WSHandlerConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler());
+ properties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_SIGNED);
+ properties.put(ConfigurationConstants.SAML_CALLBACK_REF, new SAML1CallbackHandler());
- properties.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
- properties.put(WSHandlerConstants.USER, "alice");
- properties.put(WSHandlerConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
- properties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties");
+ properties.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+ properties.put(ConfigurationConstants.USER, "alice");
+ properties.put(ConfigurationConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
+ properties.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
client.getOutInterceptors().add(ohandler);
@@ -131,9 +131,9 @@ public class DOMToStaxSamlTest extends AbstractSecurityTest {
client.getOutInterceptors().add(new LoggingOutInterceptor());
Map<String, Object> properties = new HashMap<>();
- properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SAML_TOKEN_UNSIGNED);
+ properties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_UNSIGNED);
properties.put(
- WSHandlerConstants.SAML_CALLBACK_REF, new SAML2CallbackHandler()
+ ConfigurationConstants.SAML_CALLBACK_REF, new SAML2CallbackHandler()
);
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
@@ -162,13 +162,13 @@ public class DOMToStaxSamlTest extends AbstractSecurityTest {
client.getOutInterceptors().add(new LoggingOutInterceptor());
Map<String, Object> properties = new HashMap<>();
- properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SAML_TOKEN_SIGNED);
- properties.put(WSHandlerConstants.SAML_CALLBACK_REF, new SAML2CallbackHandler());
+ properties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_SIGNED);
+ properties.put(ConfigurationConstants.SAML_CALLBACK_REF, new SAML2CallbackHandler());
- properties.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
- properties.put(WSHandlerConstants.USER, "alice");
- properties.put(WSHandlerConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
- properties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties");
+ properties.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+ properties.put(ConfigurationConstants.USER, "alice");
+ properties.put(ConfigurationConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
+ properties.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
client.getOutInterceptors().add(ohandler);
@@ -201,16 +201,16 @@ public class DOMToStaxSamlTest extends AbstractSecurityTest {
client.getOutInterceptors().add(new LoggingOutInterceptor());
Map<String, Object> properties = new HashMap<>();
- properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SAML_TOKEN_SIGNED);
+ properties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_SIGNED);
SAML1CallbackHandler callbackHandler = new SAML1CallbackHandler();
callbackHandler.setConfirmationMethod(SAML1Constants.CONF_HOLDER_KEY);
callbackHandler.setSignAssertion(true);
- properties.put(WSHandlerConstants.SAML_CALLBACK_REF, callbackHandler);
+ properties.put(ConfigurationConstants.SAML_CALLBACK_REF, callbackHandler);
- properties.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
- properties.put(WSHandlerConstants.USER, "alice");
- properties.put(WSHandlerConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
- properties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties");
+ properties.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+ properties.put(ConfigurationConstants.USER, "alice");
+ properties.put(ConfigurationConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
+ properties.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
client.getOutInterceptors().add(ohandler);
@@ -251,16 +251,16 @@ public class DOMToStaxSamlTest extends AbstractSecurityTest {
client.getOutInterceptors().add(new LoggingOutInterceptor());
Map<String, Object> properties = new HashMap<>();
- properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.SAML_TOKEN_SIGNED);
+ properties.put(ConfigurationConstants.ACTION, ConfigurationConstants.SAML_TOKEN_SIGNED);
SAML2CallbackHandler callbackHandler = new SAML2CallbackHandler();
callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
callbackHandler.setSignAssertion(true);
- properties.put(WSHandlerConstants.SAML_CALLBACK_REF, callbackHandler);
+ properties.put(ConfigurationConstants.SAML_CALLBACK_REF, callbackHandler);
- properties.put(WSHandlerConstants.SIG_KEY_ID, "DirectReference");
- properties.put(WSHandlerConstants.USER, "alice");
- properties.put(WSHandlerConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
- properties.put(WSHandlerConstants.SIG_PROP_FILE, "alice.properties");
+ properties.put(ConfigurationConstants.SIG_KEY_ID, "DirectReference");
+ properties.put(ConfigurationConstants.USER, "alice");
+ properties.put(ConfigurationConstants.PW_CALLBACK_REF, new PasswordCallbackHandler());
+ properties.put(ConfigurationConstants.SIG_PROP_FILE, "alice.properties");
WSS4JOutInterceptor ohandler = new WSS4JOutInterceptor(properties);
client.getOutInterceptors().add(ohandler);