cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1453429 [3/3] - in /cxf/branches/wss4j2.0-port/services/sts: sts-core/src/main/java/org/apache/cxf/sts/ sts-core/src/main/java/org/apache/cxf/sts/claims/ sts-core/src/main/java/org/apache/cxf/sts/operation/ sts-core/src/main/java/org/apach...
Date Wed, 06 Mar 2013 17:03:49 GMT
Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java Wed Mar  6 17:03:47 2013
@@ -45,11 +45,11 @@ import org.apache.cxf.sts.token.provider
 import org.apache.cxf.sts.token.provider.TokenProviderResponse;
 import org.apache.cxf.sts.token.realm.SAMLRealm;
 import org.apache.cxf.sts.token.realm.SAMLRealmCodec;
-import org.apache.ws.security.CustomTokenPrincipal;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
+import org.apache.wss4j.dom.WSConstants;
 
 /**
  * Some unit tests for validating a SAML token in different realms via the SAMLTokenValidator.
@@ -249,10 +249,10 @@ public class SAMLTokenValidatorRealmTest
     private Properties getEncryptionProperties() {
         Properties properties = new Properties();
         properties.put(
-            "org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin"
+            "org.apache.wss4j.crypto.provider", "org.apache.wss4j.common.crypto.Merlin"
         );
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.password", "stsspass");
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.file", "stsstore.jks");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.password", "stsspass");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.file", "stsstore.jks");
         
         return properties;
     }

Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java Wed Mar  6 17:03:47 2013
@@ -54,13 +54,13 @@ import org.apache.cxf.sts.token.provider
 import org.apache.cxf.sts.token.provider.TokenProviderParameters;
 import org.apache.cxf.sts.token.provider.TokenProviderResponse;
 import org.apache.cxf.ws.security.tokenstore.TokenStore;
-import org.apache.ws.security.CustomTokenPrincipal;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSPasswordCallback;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
-import org.apache.ws.security.util.XmlSchemaDateFormat;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.util.XmlSchemaDateFormat;
 import org.junit.BeforeClass;
 
 
@@ -485,10 +485,10 @@ public class SAMLTokenValidatorTest exte
     private Properties getEncryptionProperties() {
         Properties properties = new Properties();
         properties.put(
-            "org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin"
+            "org.apache.wss4j.crypto.provider", "org.apache.wss4j.common.crypto.Merlin"
         );
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.password", "stsspass");
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.file", "stsstore.jks");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.password", "stsspass");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.file", "stsstore.jks");
         
         return properties;
     }
@@ -496,10 +496,10 @@ public class SAMLTokenValidatorTest exte
     private Properties getEveCryptoProperties() {
         Properties properties = new Properties();
         properties.put(
-            "org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin"
+            "org.apache.wss4j.crypto.provider", "org.apache.wss4j.common.crypto.Merlin"
         );
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.password", "evespass");
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.file", "eve.jks");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.password", "evespass");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.file", "eve.jks");
         
         return properties;
     }

Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java Wed Mar  6 17:03:47 2013
@@ -41,11 +41,11 @@ import org.apache.cxf.sts.token.provider
 import org.apache.cxf.sts.token.provider.TokenProviderResponse;
 import org.apache.cxf.ws.security.tokenstore.TokenStore;
 import org.apache.cxf.ws.security.trust.STSUtils;
-import org.apache.ws.security.CustomTokenPrincipal;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
-import org.apache.ws.security.message.token.SecurityContextToken;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
+import org.apache.wss4j.dom.message.token.SecurityContextToken;
 
 
 /**
@@ -195,10 +195,10 @@ public class SCTValidatorTest extends or
     private Properties getEncryptionProperties() {
         Properties properties = new Properties();
         properties.put(
-            "org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin"
+            "org.apache.wss4j.crypto.provider", "org.apache.wss4j.common.crypto.Merlin"
         );
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.password", "stsspass");
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.file", "stsstore.jks");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.password", "stsspass");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.file", "stsstore.jks");
         
         return properties;
     }

Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java Wed Mar  6 17:03:47 2013
@@ -42,12 +42,12 @@ import org.apache.cxf.ws.security.sts.pr
 import org.apache.cxf.ws.security.sts.provider.model.secext.EncodedString;
 import org.apache.cxf.ws.security.sts.provider.model.secext.PasswordString;
 import org.apache.cxf.ws.security.sts.provider.model.secext.UsernameTokenType;
-import org.apache.ws.security.CustomTokenPrincipal;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
-import org.apache.ws.security.message.token.UsernameToken;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.message.token.UsernameToken;
 
 
 /**
@@ -268,10 +268,10 @@ public class UsernameTokenValidatorTest 
     private Properties getEncryptionProperties() {
         Properties properties = new Properties();
         properties.put(
-            "org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin"
+            "org.apache.wss4j.crypto.provider", "org.apache.wss4j.common.crypto.Merlin"
         );
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.password", "stsspass");
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.file", "stsstore.jks");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.password", "stsspass");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.file", "stsstore.jks");
         
         return properties;
     }

Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java Wed Mar  6 17:03:47 2013
@@ -36,13 +36,13 @@ import org.apache.cxf.sts.request.Receiv
 import org.apache.cxf.sts.request.ReceivedToken.STATE;
 import org.apache.cxf.sts.request.TokenRequirements;
 import org.apache.cxf.ws.security.sts.provider.model.secext.BinarySecurityTokenType;
-import org.apache.ws.security.CustomTokenPrincipal;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
-import org.apache.ws.security.components.crypto.CryptoType;
-import org.apache.ws.security.util.Base64;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.crypto.CryptoType;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.xml.security.utils.Base64;
 
 
 /**
@@ -171,10 +171,10 @@ public class X509TokenValidatorTest exte
     private Properties getEncryptionProperties() {
         Properties properties = new Properties();
         properties.put(
-            "org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin"
+            "org.apache.wss4j.crypto.provider", "org.apache.wss4j.common.crypto.Merlin"
         );
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.password", "stsspass");
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.file", "stsstore.jks");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.password", "stsspass");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.file", "stsstore.jks");
         
         return properties;
     }
@@ -182,10 +182,10 @@ public class X509TokenValidatorTest exte
     private Properties getEveCryptoProperties() {
         Properties properties = new Properties();
         properties.put(
-            "org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin"
+            "org.apache.wss4j.crypto.provider", "org.apache.wss4j.common.crypto.Merlin"
         );
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.password", "evespass");
-        properties.put("org.apache.ws.security.crypto.merlin.keystore.file", "eve.jks");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.password", "evespass");
+        properties.put("org.apache.wss4j.crypto.merlin.keystore.file", "eve.jks");
         
         return properties;
     }

Modified: cxf/branches/wss4j2.0-port/services/sts/sts-war/src/main/java/org/apache/cxf/sts/war/PasswordCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-war/src/main/java/org/apache/cxf/sts/war/PasswordCallbackHandler.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-war/src/main/java/org/apache/cxf/sts/war/PasswordCallbackHandler.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-war/src/main/java/org/apache/cxf/sts/war/PasswordCallbackHandler.java Wed Mar  6 17:03:47 2013
@@ -22,7 +22,7 @@ import java.io.IOException;
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
 
 public class PasswordCallbackHandler implements CallbackHandler {
 

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java Wed Mar  6 17:03:47 2013
@@ -93,27 +93,28 @@ import org.apache.cxf.wsdl.EndpointRefer
 import org.apache.cxf.wsdl11.WSDLServiceFactory;
 import org.apache.neethi.Policy;
 import org.apache.neethi.PolicyComponent;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSDocInfo;
-import org.apache.ws.security.WSSConfig;
-import org.apache.ws.security.WSSecurityEngineResult;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
-import org.apache.ws.security.components.crypto.CryptoType;
-import org.apache.ws.security.conversation.ConversationException;
-import org.apache.ws.security.conversation.dkalgo.P_SHA1;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.message.token.BinarySecurity;
-import org.apache.ws.security.message.token.Reference;
-import org.apache.ws.security.processor.EncryptedKeyProcessor;
-import org.apache.ws.security.processor.X509Util;
-import org.apache.ws.security.util.Base64;
-import org.apache.ws.security.util.WSSecurityUtil;
-import org.apache.ws.security.util.XmlSchemaDateFormat;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.crypto.CryptoType;
+import org.apache.wss4j.common.derivedKey.ConversationException;
+import org.apache.wss4j.common.derivedKey.P_SHA1;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.WSDocInfo;
+import org.apache.wss4j.dom.WSSConfig;
+import org.apache.wss4j.dom.WSSecurityEngineResult;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.message.token.BinarySecurity;
+import org.apache.wss4j.dom.message.token.Reference;
+import org.apache.wss4j.dom.processor.EncryptedKeyProcessor;
+import org.apache.wss4j.dom.processor.X509Util;
+import org.apache.wss4j.dom.util.WSSecurityUtil;
+import org.apache.wss4j.dom.util.XmlSchemaDateFormat;
+import org.apache.xml.security.exceptions.Base64DecodingException;
 import org.apache.xml.security.keys.content.X509Data;
 import org.apache.xml.security.keys.content.keyvalues.DSAKeyValue;
 import org.apache.xml.security.keys.content.keyvalues.RSAKeyValue;
+import org.apache.xml.security.utils.Base64;
 
 /**
  * A primitive STSClient for batch tokens. Note that this contains a number of hacks and should NOT be
@@ -840,7 +841,7 @@ public class SimpleBatchSTSClient implem
     }
 
     protected SecurityToken createSecurityToken(Element el, byte[] requestorEntropy)
-        throws WSSecurityException {
+        throws WSSecurityException, Base64DecodingException {
 
         if ("RequestSecurityTokenResponseCollection".equals(el.getLocalName())) {
             el = DOMUtils.getFirstElement(el);
@@ -942,7 +943,7 @@ public class SimpleBatchSTSClient implem
         return token;
     }
     
-    protected byte[] decryptKey(Element child) throws TrustException, WSSecurityException {
+    protected byte[] decryptKey(Element child) throws TrustException, WSSecurityException, Base64DecodingException {
         String encryptionAlgorithm = X509Util.getEncAlgo(child);
         // For the SPNEGO case just return the decoded cipher value and decrypt it later
         if (encryptionAlgorithm != null && encryptionAlgorithm.endsWith("spnego#GSS_Wrap")) {
@@ -959,7 +960,7 @@ public class SimpleBatchSTSClient implem
                 }
             }
             if (cipherValue == null) {
-                throw new WSSecurityException(WSSecurityException.INVALID_SECURITY, "noCipher");
+                throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY, "noCipher");
             }
             return cipherValue;
         } else {

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/claims/ClaimsValidator.java Wed Mar  6 17:03:47 2013
@@ -23,11 +23,11 @@ import java.util.List;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.sts.claims.ClaimTypes;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.validate.Credential;
-import org.apache.ws.security.validate.SamlAssertionValidator;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.Credential;
+import org.apache.wss4j.dom.validate.SamlAssertionValidator;
 import org.opensaml.xml.XMLObject;
 
 /**
@@ -41,7 +41,7 @@ public class ClaimsValidator extends Sam
     @Override
     public Credential validate(Credential credential, RequestData data) throws WSSecurityException {
         Credential validatedCredential = super.validate(credential, data);
-        AssertionWrapper assertion = validatedCredential.getAssertion();
+        SamlAssertionWrapper assertion = validatedCredential.getSamlAssertion();
         
         boolean valid = false;
         if (assertion.getSaml1() != null) {
@@ -54,7 +54,7 @@ public class ClaimsValidator extends Sam
             return validatedCredential;
         }
 
-        throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+        throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
     }
     
     private boolean handleSAML1Assertion(
@@ -63,7 +63,7 @@ public class ClaimsValidator extends Sam
         List<org.opensaml.saml1.core.AttributeStatement> attributeStatements = 
             assertion.getAttributeStatements();
         if (attributeStatements == null || attributeStatements.isEmpty()) {
-            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
         }
 
         for (org.opensaml.saml1.core.AttributeStatement statement : attributeStatements) {
@@ -92,7 +92,7 @@ public class ClaimsValidator extends Sam
         List<org.opensaml.saml2.core.AttributeStatement> attributeStatements = 
             assertion.getAttributeStatements();
         if (attributeStatements == null || attributeStatements.isEmpty()) {
-            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
         }
         
         for (org.opensaml.saml2.core.AttributeStatement statement : attributeStatements) {

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java Wed Mar  6 17:03:47 2013
@@ -22,7 +22,7 @@ import java.io.IOException;
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
 
 public class CommonCallbackHandler implements CallbackHandler {
 

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/cross_domain/CrossDomainValidator.java Wed Mar  6 17:03:47 2013
@@ -18,11 +18,11 @@
  */
 package org.apache.cxf.systest.sts.cross_domain;
 
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.validate.Credential;
-import org.apache.ws.security.validate.SamlAssertionValidator;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.Credential;
+import org.apache.wss4j.dom.validate.SamlAssertionValidator;
 
 /**
  * This class validates a SAML Assertion by checking the issuer name.
@@ -32,10 +32,10 @@ public class CrossDomainValidator extend
     public Credential validate(Credential credential, RequestData data) throws WSSecurityException {
         Credential validatedCredential = super.validate(credential, data);
         
-        AssertionWrapper token = validatedCredential.getAssertion();
+        SamlAssertionWrapper token = validatedCredential.getSamlAssertion();
         if (token == null || token.getSaml2() == null
             || !"b-issuer".equals(token.getIssuerString())) {
-            throw new WSSecurityException(WSSecurityException.FAILURE);
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
         }
 
         return validatedCredential;

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomBSTTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomBSTTokenValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomBSTTokenValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/custom_onbehalfof/CustomBSTTokenValidator.java Wed Mar  6 17:03:47 2013
@@ -19,10 +19,10 @@
 package org.apache.cxf.systest.sts.custom_onbehalfof;
 
 import org.apache.cxf.ws.security.trust.STSTokenValidator;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.validate.Credential;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.Credential;
 
 /**
  * This class validates a custom BinarySecurityToken by dispatching it to an STS. It then
@@ -33,10 +33,10 @@ public class CustomBSTTokenValidator ext
     public Credential validate(Credential credential, RequestData data) throws WSSecurityException {
         Credential validatedCredential = super.validate(credential, data);
         
-        AssertionWrapper transformedToken = validatedCredential.getTransformedToken();
+        SamlAssertionWrapper transformedToken = validatedCredential.getTransformedToken();
         if (transformedToken == null || transformedToken.getSaml2() == null
             || !"DoubleItSTSIssuer".equals(transformedToken.getIssuerString())) {
-            throw new WSSecurityException(WSSecurityException.FAILURE);
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
         }
         
         return validatedCredential;

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java Wed Mar  6 17:03:47 2013
@@ -29,10 +29,10 @@ import org.apache.cxf.sts.claims.ClaimsM
 import org.apache.cxf.sts.claims.ClaimsParameters;
 import org.apache.cxf.sts.token.provider.AttributeStatementProvider;
 import org.apache.cxf.sts.token.provider.TokenProviderParameters;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.saml.ext.bean.AttributeBean;
-import org.apache.ws.security.saml.ext.bean.AttributeStatementBean;
-import org.apache.ws.security.saml.ext.builder.SAML2Constants;
+import org.apache.wss4j.common.saml.bean.AttributeBean;
+import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
+import org.apache.wss4j.common.saml.builder.SAML2Constants;
+import org.apache.wss4j.dom.WSConstants;
 
 public class CustomAttributeStatementProvider implements AttributeStatementProvider {
     

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java Wed Mar  6 17:03:47 2013
@@ -26,8 +26,8 @@ import org.apache.cxf.sts.token.provider
 import org.apache.cxf.sts.token.provider.TokenProviderParameters;
 import org.apache.cxf.sts.token.provider.TokenProviderResponse;
 import org.apache.cxf.ws.security.sts.provider.STSException;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.message.token.BinarySecurity;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.message.token.BinarySecurity;
 
 /**
  * A TokenProvider implementation that creates a (custom) BinarySecurityToken.

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java Wed Mar  6 17:03:47 2013
@@ -25,8 +25,8 @@ import org.apache.cxf.sts.token.validato
 import org.apache.cxf.sts.token.validator.TokenValidatorParameters;
 import org.apache.cxf.sts.token.validator.TokenValidatorResponse;
 import org.apache.cxf.ws.security.sts.provider.model.secext.BinarySecurityTokenType;
-import org.apache.ws.security.CustomTokenPrincipal;
-import org.apache.ws.security.util.Base64;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
+import org.apache.xml.security.utils.Base64;
 
 
 /**

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java Wed Mar  6 17:03:47 2013
@@ -27,8 +27,8 @@ import org.apache.cxf.sts.token.provider
 import org.apache.cxf.sts.token.provider.TokenProviderResponse;
 import org.apache.cxf.ws.security.sts.provider.STSException;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.message.token.UsernameToken;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.message.token.UsernameToken;
 
 /**
  * A TokenProvider implementation that creates a UsernameToken.

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/SCTTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/SCTTokenValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/SCTTokenValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/SCTTokenValidator.java Wed Mar  6 17:03:47 2013
@@ -25,9 +25,9 @@ import org.apache.cxf.ws.policy.Assertio
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.trust.STSTokenValidator;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.validate.Credential;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.Credential;
 
 /**
  * This class validates a SecurityContextToken by dispatching it to an STS. It pauses first to make sure

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/CustomIdentityMapper.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/CustomIdentityMapper.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/CustomIdentityMapper.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/CustomIdentityMapper.java Wed Mar  6 17:03:47 2013
@@ -21,7 +21,7 @@ package org.apache.cxf.systest.sts.realm
 import java.security.Principal;
 
 import org.apache.cxf.sts.IdentityMapper;
-import org.apache.ws.security.CustomTokenPrincipal;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
 
 /**
  * A test implementation of RealmParser.

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/DifferentRealmValidator.java Wed Mar  6 17:03:47 2013
@@ -19,10 +19,10 @@
 package org.apache.cxf.systest.sts.realms;
 
 import org.apache.cxf.ws.security.trust.STSTokenValidator;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.validate.Credential;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.Credential;
 import org.opensaml.saml2.core.Assertion;
 
 /**
@@ -35,15 +35,15 @@ public class DifferentRealmValidator ext
     public Credential validate(Credential credential, RequestData data) throws WSSecurityException {
         Credential validatedCredential = super.validate(credential, data);
         
-        AssertionWrapper transformedToken = validatedCredential.getTransformedToken();
+        SamlAssertionWrapper transformedToken = validatedCredential.getTransformedToken();
         if (transformedToken == null || transformedToken.getSaml2() == null
             || !"B-Issuer".equals(transformedToken.getIssuerString())) {
-            throw new WSSecurityException(WSSecurityException.FAILURE);
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
         }
 
         Assertion assertion = transformedToken.getSaml2();
         if (!"B-Principal".equals(assertion.getSubject().getNameID().getValue())) {
-            throw new WSSecurityException(WSSecurityException.FAILURE);
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
         }
         
         return validatedCredential;

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/IssuerSAMLRealmCodec.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/IssuerSAMLRealmCodec.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/IssuerSAMLRealmCodec.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/realms/IssuerSAMLRealmCodec.java Wed Mar  6 17:03:47 2013
@@ -20,7 +20,7 @@
 package org.apache.cxf.systest.sts.realms;
 
 import org.apache.cxf.sts.token.realm.SAMLRealmCodec;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 
 
 /**
@@ -29,11 +29,11 @@ import org.apache.ws.security.saml.ext.A
 public class IssuerSAMLRealmCodec implements SAMLRealmCodec {
     
     /**
-     * Get the realm associated with the AssertionWrapper parameter
+     * Get the realm associated with the SamlAssertionWrapper parameter
      * @param assertion a SAML Assertion wrapper object
-     * @return the realm associated with the AssertionWrapper parameter
+     * @return the realm associated with the SamlAssertionWrapper parameter
      */
-    public String getRealmFromToken(AssertionWrapper assertion) {
+    public String getRealmFromToken(SamlAssertionWrapper assertion) {
         if ("A-Issuer".equals(assertion.getIssuerString())) {
             return "A";
         } else if ("B-Issuer".equals(assertion.getIssuerString())) {

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/renew/SAMLRenewUnitTest.java Wed Mar  6 17:03:47 2013
@@ -30,7 +30,7 @@ import org.apache.cxf.testutil.common.Ab
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
 import org.apache.cxf.ws.security.trust.STSClient;
-import org.apache.ws.security.WSConstants;
+import org.apache.wss4j.dom.WSConstants;
 import org.junit.BeforeClass;
 
 /**

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java Wed Mar  6 17:03:47 2013
@@ -45,14 +45,14 @@ import org.apache.cxf.sts.token.provider
 import org.apache.cxf.sts.token.provider.TokenProviderResponse;
 import org.apache.cxf.sts.token.validator.SCTValidator;
 import org.apache.cxf.ws.security.sts.provider.STSException;
-
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSPasswordCallback;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.saml.ext.SAMLParms;
-import org.apache.ws.security.saml.ext.bean.AttributeStatementBean;
-import org.apache.ws.security.saml.ext.bean.ConditionsBean;
-import org.apache.ws.security.saml.ext.bean.SubjectBean;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+import org.apache.wss4j.common.saml.SAMLCallback;
+import org.apache.wss4j.common.saml.SAMLUtil;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
+import org.apache.wss4j.common.saml.bean.ConditionsBean;
+import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.dom.WSConstants;
 
 /**
  * A TokenProvider implementation that provides a SAML Token that contains a Symmetric Key that is obtained
@@ -101,7 +101,7 @@ public class SCTSAMLTokenProvider implem
 
         try {
             Document doc = DOMUtils.createDocument();
-            AssertionWrapper assertion = createSamlToken(tokenParameters, secret, doc);
+            SamlAssertionWrapper assertion = createSamlToken(tokenParameters, secret, doc);
             Element token = assertion.toDOM(doc);
 
             TokenProviderResponse response = new TokenProviderResponse();
@@ -183,21 +183,21 @@ public class SCTSAMLTokenProvider implem
         this.signToken = signToken;
     }
 
-    private AssertionWrapper createSamlToken(
+    private SamlAssertionWrapper createSamlToken(
         TokenProviderParameters tokenParameters, byte[] secret, Document doc
     ) throws Exception {
         SamlCallbackHandler handler = createCallbackHandler(tokenParameters, secret, doc);
 
-        SAMLParms samlParms = new SAMLParms();
-        samlParms.setCallbackHandler(handler);
-        AssertionWrapper assertion = new AssertionWrapper(samlParms);
+        SAMLCallback samlCallback = new SAMLCallback();
+        SAMLUtil.doSAMLCallback(handler, samlCallback);
+        SamlAssertionWrapper assertion = new SamlAssertionWrapper(samlCallback);
 
         if (signToken) {
             STSPropertiesMBean stsProperties = tokenParameters.getStsProperties();
 
             // Get the password
             String alias = stsProperties.getSignatureUsername();
-            WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
+            WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.Usage.SIGNATURE)};
             LOG.fine("Creating SAML Token");
             stsProperties.getCallbackHandler().handle(cb);
             String password = cb[0].getPassword();

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java Wed Mar  6 17:03:47 2013
@@ -21,12 +21,13 @@ package org.apache.cxf.systest.sts.secur
 import org.w3c.dom.Document;
 
 import org.apache.cxf.ws.security.trust.STSTokenValidator;
-import org.apache.ws.security.WSDocInfo;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.saml.SAMLKeyInfo;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.validate.Credential;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.SAMLKeyInfo;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.WSDocInfo;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.saml.WSSSAMLKeyInfoProcessor;
+import org.apache.wss4j.dom.validate.Credential;
 
 /**
  * This class validates a SecurityContextToken by dispatching it to an STS. It then
@@ -37,14 +38,18 @@ public class SCTTokenValidator extends S
     public Credential validate(Credential credential, RequestData data) throws WSSecurityException {
         Credential validatedCredential = super.validate(credential, data);
         
-        AssertionWrapper transformedToken = validatedCredential.getTransformedToken();
+        SamlAssertionWrapper transformedToken = validatedCredential.getTransformedToken();
         if (transformedToken == null || transformedToken.getSaml2() == null
             || !"DoubleItSTSIssuer".equals(transformedToken.getIssuerString())) {
-            throw new WSSecurityException(WSSecurityException.FAILURE);
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
         }
 
         Document doc = transformedToken.getElement().getOwnerDocument();
-        transformedToken.parseHOKSubject(data, new WSDocInfo(doc));
+        
+        transformedToken.parseHOKSubject(
+            new WSSSAMLKeyInfoProcessor(data, new WSDocInfo(doc)), data.getSigVerCrypto(), 
+            data.getCallbackHandler()
+        );
         SAMLKeyInfo keyInfo = transformedToken.getSubjectKeyInfo();
         byte[] secret = keyInfo.getSecret();
         validatedCredential.setSecretKey(secret);

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/DoubleItPortTypeImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/DoubleItPortTypeImpl.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/DoubleItPortTypeImpl.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/transformation/DoubleItPortTypeImpl.java Wed Mar  6 17:03:47 2013
@@ -27,14 +27,13 @@ import javax.xml.ws.handler.MessageConte
 
 import org.apache.cxf.feature.Features;
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSSecurityEngineResult;
-import org.apache.ws.security.handler.WSHandlerConstants;
-import org.apache.ws.security.handler.WSHandlerResult;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.util.WSSecurityUtil;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.WSSecurityEngineResult;
+import org.apache.wss4j.dom.handler.WSHandlerConstants;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
+import org.apache.wss4j.dom.util.WSSecurityUtil;
 import org.example.contract.doubleit.DoubleItPortType;
-
 import org.junit.Assert;
 
 @WebService(targetNamespace = "http://www.example.org/contract/DoubleIt", 
@@ -55,8 +54,8 @@ public class DoubleItPortTypeImpl implem
             CastUtils.cast((List<?>)context.get(WSHandlerConstants.RECV_RESULTS));
         WSSecurityEngineResult actionResult =
             WSSecurityUtil.fetchActionResult(handlerResults.get(0).getResults(), WSConstants.UT);
-        AssertionWrapper assertion = 
-            (AssertionWrapper)actionResult.get(WSSecurityEngineResult.TAG_TRANSFORMED_TOKEN);
+        SamlAssertionWrapper assertion = 
+            (SamlAssertionWrapper)actionResult.get(WSSecurityEngineResult.TAG_TRANSFORMED_TOKEN);
         Assert.assertTrue(assertion != null && "DoubleItSTSIssuer".equals(assertion.getIssuerString()));
         
         return numberToDouble * 2;

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml Wed Mar  6 17:03:47 2013
@@ -180,7 +180,7 @@
 		endpointName="ns1:Transport_Soap12_Port">
 	</jaxws:endpoint>
 
-	<bean id="kerberosValidator" class="org.apache.ws.security.validate.KerberosTokenValidator">
+	<bean id="kerberosValidator" class="org.apache.wss4j.dom.validate.KerberosTokenValidator">
 		<property name="jaasLoginModuleName" value="bob" />
 		<property name="serviceName" value="bob@service.ws.apache.org" />
 	</bean>

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java Wed Mar  6 17:03:47 2013
@@ -41,10 +41,10 @@ import org.apache.cxf.ws.security.Securi
 import org.apache.cxf.ws.security.tokenstore.MemoryTokenStore;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
 import org.apache.cxf.ws.security.tokenstore.TokenStore;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.saml.ext.SAMLParms;
-
+import org.apache.wss4j.common.saml.SAMLCallback;
+import org.apache.wss4j.common.saml.SAMLUtil;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.WSConstants;
 import org.example.contract.doubleit.DoubleItPortType;
 import org.junit.BeforeClass;
 
@@ -146,9 +146,9 @@ public class BearerTest extends Abstract
         ep.getEndpointInfo().setProperty(SecurityConstants.TOKEN_ID, id);
         TokenStore store = (TokenStore)ep.getEndpointInfo().getProperty(TokenStore.class.getName());
 
-        SAMLParms samlParms = new SAMLParms();
-        samlParms.setCallbackHandler(new Saml2CallbackHandler());
-        AssertionWrapper assertion = new AssertionWrapper(samlParms);
+        SAMLCallback samlCallback = new SAMLCallback();
+        SAMLUtil.doSAMLCallback(new Saml2CallbackHandler(), samlCallback);
+        SamlAssertionWrapper assertion = new SamlAssertionWrapper(samlCallback);
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         dbf.setNamespaceAware(true);
         DocumentBuilder db = dbf.newDocumentBuilder();

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java Wed Mar  6 17:03:47 2013
@@ -25,11 +25,11 @@ import javax.security.auth.callback.Call
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
-import org.apache.ws.security.saml.ext.SAMLCallback;
-import org.apache.ws.security.saml.ext.bean.AttributeBean;
-import org.apache.ws.security.saml.ext.bean.AttributeStatementBean;
-import org.apache.ws.security.saml.ext.bean.SubjectBean;
-import org.apache.ws.security.saml.ext.builder.SAML2Constants;
+import org.apache.wss4j.common.saml.SAMLCallback;
+import org.apache.wss4j.common.saml.bean.AttributeBean;
+import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
+import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.opensaml.common.SAMLVersion;
 
 /**

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CommonCallbackHandler.java Wed Mar  6 17:03:47 2013
@@ -22,7 +22,7 @@ import java.io.IOException;
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
-import org.apache.ws.security.WSPasswordCallback;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
 
 public class CommonCallbackHandler implements CallbackHandler {
 

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/OnBehalfOfValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/OnBehalfOfValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/OnBehalfOfValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/OnBehalfOfValidator.java Wed Mar  6 17:03:47 2013
@@ -22,11 +22,11 @@ import java.util.List;
 
 import org.w3c.dom.Element;
 
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.validate.Credential;
-import org.apache.ws.security.validate.SamlAssertionValidator;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.Credential;
+import org.apache.wss4j.dom.validate.SamlAssertionValidator;
 import org.opensaml.saml2.core.Assertion;
 import org.opensaml.saml2.core.Attribute;
 import org.opensaml.saml2.core.AttributeStatement;
@@ -41,16 +41,16 @@ public class OnBehalfOfValidator extends
     @Override
     public Credential validate(Credential credential, RequestData data) throws WSSecurityException {
         Credential validatedCredential = super.validate(credential, data);
-        AssertionWrapper assertion = validatedCredential.getAssertion();
+        SamlAssertionWrapper assertion = validatedCredential.getSamlAssertion();
         
         Assertion saml2Assertion = assertion.getSaml2();
         if (saml2Assertion == null) {
-            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
         }
         
         List<AttributeStatement> attributeStatements = saml2Assertion.getAttributeStatements();
         if (attributeStatements == null || attributeStatements.isEmpty()) {
-            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
         }
         
         for (AttributeStatement statement : attributeStatements) {
@@ -69,7 +69,7 @@ public class OnBehalfOfValidator extends
             }
         }
         
-        throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+        throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
     }
 
 }

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java Wed Mar  6 17:03:47 2013
@@ -39,19 +39,18 @@ import org.apache.cxf.testutil.common.Ab
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
 import org.apache.cxf.ws.security.trust.STSClient;
-import org.apache.ws.security.WSDocInfo;
-import org.apache.ws.security.WSSConfig;
-import org.apache.ws.security.WSSecurityEngineResult;
-import org.apache.ws.security.components.crypto.Crypto;
-import org.apache.ws.security.components.crypto.CryptoFactory;
-import org.apache.ws.security.components.crypto.CryptoType;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.message.token.X509Security;
-import org.apache.ws.security.processor.Processor;
-import org.apache.ws.security.processor.SAMLTokenProcessor;
-import org.apache.ws.security.saml.SAMLKeyInfo;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.saml.ext.OpenSAMLUtil;
+import org.apache.wss4j.common.crypto.Crypto;
+import org.apache.wss4j.common.crypto.CryptoFactory;
+import org.apache.wss4j.common.crypto.CryptoType;
+import org.apache.wss4j.common.saml.OpenSAMLUtil;
+import org.apache.wss4j.common.saml.SAMLKeyInfo;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.WSDocInfo;
+import org.apache.wss4j.dom.WSSecurityEngineResult;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.message.token.X509Security;
+import org.apache.wss4j.dom.processor.Processor;
+import org.apache.wss4j.dom.processor.SAMLTokenProcessor;
 import org.junit.BeforeClass;
 
 /**
@@ -120,8 +119,8 @@ public class IssueUnitTest extends Abstr
         List<WSSecurityEngineResult> results = processToken(token);
 
         assertTrue(results != null && results.size() == 1);
-        AssertionWrapper assertion = 
-            (AssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+        SamlAssertionWrapper assertion = 
+            (SamlAssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(assertion != null);
         assertTrue(assertion.getSaml1() != null && assertion.getSaml2() == null);
         assertTrue(assertion.isSigned());
@@ -160,8 +159,8 @@ public class IssueUnitTest extends Abstr
         // Process the token
         List<WSSecurityEngineResult> results = processToken(token);
         assertTrue(results != null && results.size() == 1);
-        AssertionWrapper assertion = 
-            (AssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+        SamlAssertionWrapper assertion = 
+            (SamlAssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(assertion != null);
         assertTrue(assertion.getSaml1() == null && assertion.getSaml2() != null);
         assertTrue(assertion.isSigned());
@@ -199,8 +198,8 @@ public class IssueUnitTest extends Abstr
         // Process the token
         List<WSSecurityEngineResult> results = processToken(token);
         assertTrue(results != null && results.size() == 1);
-        AssertionWrapper assertion = 
-            (AssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+        SamlAssertionWrapper assertion = 
+            (SamlAssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(assertion != null);
         assertTrue(assertion.getSaml1() != null && assertion.getSaml2() == null);
         assertTrue(assertion.isSigned());
@@ -249,8 +248,8 @@ public class IssueUnitTest extends Abstr
         // Process the token
         List<WSSecurityEngineResult> results = processToken(token);
         assertTrue(results != null && results.size() == 1);
-        AssertionWrapper assertion = 
-            (AssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+        SamlAssertionWrapper assertion = 
+            (SamlAssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(assertion != null);
         assertTrue(assertion.getSaml1() == null && assertion.getSaml2() != null);
         assertTrue(assertion.isSigned());
@@ -309,8 +308,8 @@ public class IssueUnitTest extends Abstr
         // Process the token
         List<WSSecurityEngineResult> results = processToken(token);
         assertTrue(results != null && results.size() == 1);
-        AssertionWrapper assertion = 
-            (AssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+        SamlAssertionWrapper assertion = 
+            (SamlAssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(assertion != null);
         assertTrue(assertion.getSaml1() != null && assertion.getSaml2() == null);
         assertTrue(assertion.isSigned());
@@ -346,8 +345,8 @@ public class IssueUnitTest extends Abstr
         // Process the token
         List<WSSecurityEngineResult> results = processToken(token);
         assertTrue(results != null && results.size() == 1);
-        AssertionWrapper assertion = 
-            (AssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+        SamlAssertionWrapper assertion = 
+            (SamlAssertionWrapper)results.get(0).get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
         assertTrue(assertion != null);
         assertTrue(assertion.getSaml1() != null && assertion.getSaml2() == null);
         assertTrue(assertion.isSigned());
@@ -468,14 +467,12 @@ public class IssueUnitTest extends Abstr
     
     private List<WSSecurityEngineResult> processToken(SecurityToken token) throws Exception {
         RequestData requestData = new RequestData();
-        WSSConfig wssConfig = WSSConfig.getNewInstance();
-        wssConfig.setWsiBSPCompliant(false);
-        requestData.setWssConfig(wssConfig);
+        requestData.setDisableBSPEnforcement(true);
         CallbackHandler callbackHandler = new org.apache.cxf.systest.sts.common.CommonCallbackHandler();
         requestData.setCallbackHandler(callbackHandler);
         Crypto crypto = CryptoFactory.getInstance("serviceKeystore.properties");
         requestData.setDecCrypto(crypto);
-        requestData.setSigCrypto(crypto);
+        requestData.setSigVerCrypto(crypto);
         
         Processor processor = new SAMLTokenProcessor();
         return processor.handleToken(

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/DoubleItPortTypeImpl.java Wed Mar  6 17:03:47 2013
@@ -33,11 +33,11 @@ import javax.xml.ws.handler.MessageConte
 import org.apache.cxf.feature.Features;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSSecurityEngineResult;
-import org.apache.ws.security.handler.WSHandlerConstants;
-import org.apache.ws.security.handler.WSHandlerResult;
-import org.apache.ws.security.util.WSSecurityUtil;
+import org.apache.wss4j.dom.WSConstants;
+import org.apache.wss4j.dom.WSSecurityEngineResult;
+import org.apache.wss4j.dom.handler.WSHandlerConstants;
+import org.apache.wss4j.dom.handler.WSHandlerResult;
+import org.apache.wss4j.dom.util.WSSecurityUtil;
 
 import org.example.contract.doubleit.DoubleItPortType;
 

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java Wed Mar  6 17:03:47 2013
@@ -26,11 +26,11 @@ import javax.security.auth.callback.Call
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
-import org.apache.ws.security.saml.ext.SAMLCallback;
-import org.apache.ws.security.saml.ext.bean.AttributeBean;
-import org.apache.ws.security.saml.ext.bean.AttributeStatementBean;
-import org.apache.ws.security.saml.ext.bean.SubjectBean;
-import org.apache.ws.security.saml.ext.builder.SAML2Constants;
+import org.apache.wss4j.common.saml.SAMLCallback;
+import org.apache.wss4j.common.saml.bean.AttributeBean;
+import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
+import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.opensaml.common.SAMLVersion;
 
 /**

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/ActAsValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/ActAsValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/ActAsValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/ActAsValidator.java Wed Mar  6 17:03:47 2013
@@ -22,11 +22,11 @@ import java.util.List;
 
 import org.w3c.dom.Element;
 
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.saml.ext.AssertionWrapper;
-import org.apache.ws.security.validate.Credential;
-import org.apache.ws.security.validate.SamlAssertionValidator;
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.dom.handler.RequestData;
+import org.apache.wss4j.dom.validate.Credential;
+import org.apache.wss4j.dom.validate.SamlAssertionValidator;
 import org.opensaml.saml2.core.Assertion;
 import org.opensaml.saml2.core.Attribute;
 import org.opensaml.saml2.core.AttributeStatement;
@@ -41,16 +41,16 @@ public class ActAsValidator extends Saml
     @Override
     public Credential validate(Credential credential, RequestData data) throws WSSecurityException {
         Credential validatedCredential = super.validate(credential, data);
-        AssertionWrapper assertion = validatedCredential.getAssertion();
+        SamlAssertionWrapper assertion = validatedCredential.getSamlAssertion();
         
         Assertion saml2Assertion = assertion.getSaml2();
         if (saml2Assertion == null) {
-            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
         }
         
         List<AttributeStatement> attributeStatements = saml2Assertion.getAttributeStatements();
         if (attributeStatements == null || attributeStatements.isEmpty()) {
-            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
         }
         
         for (AttributeStatement statement : attributeStatements) {
@@ -69,7 +69,7 @@ public class ActAsValidator extends Saml
             }
         }
         
-        throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
+        throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
     }
 
 }

Modified: cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java?rev=1453429&r1=1453428&r2=1453429&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java Wed Mar  6 17:03:47 2013
@@ -24,7 +24,7 @@ import org.apache.cxf.sts.token.validato
 import org.apache.cxf.sts.token.validator.TokenValidatorParameters;
 import org.apache.cxf.sts.token.validator.TokenValidatorResponse;
 import org.apache.cxf.ws.security.sts.provider.model.secext.UsernameTokenType;
-import org.apache.ws.security.CustomTokenPrincipal;
+import org.apache.wss4j.dom.CustomTokenPrincipal;
 
 public class UsernameTokenValidator implements TokenValidator {
     



Mime
View raw message