ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1660124 - in /webservices/wss4j/branches/2_0_x-fixes: ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/ ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ ws-security-stax/src/test/java/org/apache/wss4j/stax/...
Date Mon, 16 Feb 2015 14:12:59 GMT
Author: coheigea
Date: Mon Feb 16 14:12:59 2015
New Revision: 1660124

URL: http://svn.apache.org/r1660124
Log:
Adding a new way to specify a SAML version for CallbackHandlers (StAX code)


Conflicts:
	ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/AsymmetricBindingIntegrationTest.java
	ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/IssuedTokenTest.java
	ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SamlTokenTest.java
	ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SupportingTokensTest.java
	ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InboundWSSecurityContextImplTest.java
	ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
	ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
	ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
	ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java
	ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java

Modified:
    webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/AsymmetricBindingIntegrationTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/IssuedTokenTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SamlTokenTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SupportingTokensTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InboundWSSecurityContextImplTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/AsymmetricBindingIntegrationTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/AsymmetricBindingIntegrationTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/AsymmetricBindingIntegrationTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/AsymmetricBindingIntegrationTest.java
Mon Feb 16 14:12:59 2015
@@ -23,8 +23,8 @@ import org.apache.wss4j.stax.securityTok
 import org.apache.xml.security.stax.config.Init;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.common.bsp.BSPRule;
 import org.apache.wss4j.common.crypto.CryptoType;
@@ -2375,7 +2375,7 @@ public class AsymmetricBindingIntegratio
         actions.add(WSSConstants.ENCRYPT_WITH_DERIVED_KEY);
         outSecurityProperties.setActions(actions);
         SAMLCallbackHandlerImpl samlCallbackHandler = new SAMLCallbackHandlerImpl();
-        samlCallbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallbackHandler.setSamlVersion(Version.SAML_20);
         samlCallbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
         samlCallbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         samlCallbackHandler.setIssuer("www.example.com");
@@ -2505,7 +2505,7 @@ public class AsymmetricBindingIntegratio
         actions.add(WSSConstants.ENCRYPT_WITH_DERIVED_KEY);
         outSecurityProperties.setActions(actions);
         SAMLCallbackHandlerImpl samlCallbackHandler = new SAMLCallbackHandlerImpl();
-        samlCallbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallbackHandler.setSamlVersion(Version.SAML_20);
         samlCallbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
         samlCallbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
         samlCallbackHandler.setIssuer("www.example.com");

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/IssuedTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/IssuedTokenTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/IssuedTokenTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/IssuedTokenTest.java
Mon Feb 16 14:12:59 2015
@@ -25,6 +25,7 @@ import org.apache.wss4j.common.saml.Saml
 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.bean.Version;
 import org.apache.wss4j.policy.stax.PolicyViolationException;
 import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.wss4j.stax.impl.securityToken.KerberosServiceSecurityTokenImpl;
@@ -33,7 +34,6 @@ import org.apache.wss4j.stax.securityEve
 import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 import org.apache.wss4j.policy.stax.PolicyEnforcer;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.securityEvent.OperationSecurityEvent;
@@ -98,7 +98,7 @@ public class IssuedTokenTest extends Abs
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(samlPolicyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("http://initiatorTokenIssuer.com");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -165,7 +165,7 @@ public class IssuedTokenTest extends Abs
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(samlPolicyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("http://initiatorTokenIssuer.com");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -234,7 +234,7 @@ public class IssuedTokenTest extends Abs
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(samlPolicyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_11);
+        samlCallback.setSamlVersion(Version.SAML_11);
         samlCallback.setIssuer("http://initiatorTokenIssuer.com");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -306,7 +306,7 @@ public class IssuedTokenTest extends Abs
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(samlPolicyString.replaceFirst("PublicKey",
"SymmetricKey"));
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("http://initiatorTokenIssuer.com");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -378,7 +378,7 @@ public class IssuedTokenTest extends Abs
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(samlPolicyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("http://initiatorTokenIssuer.com");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SamlTokenTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SamlTokenTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SamlTokenTest.java
Mon Feb 16 14:12:59 2015
@@ -21,12 +21,12 @@ package org.apache.wss4j.policy.stax.tes
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.wss4j.stax.impl.securityToken.SamlSecurityTokenImpl;
 import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.policy.stax.PolicyEnforcer;
 import org.apache.wss4j.policy.stax.PolicyViolationException;
@@ -80,7 +80,7 @@ public class SamlTokenTest extends Abstr
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("xs:anyURI");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -162,7 +162,7 @@ public class SamlTokenTest extends Abstr
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("xs:anyURI");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SupportingTokensTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SupportingTokensTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SupportingTokensTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/SupportingTokensTest.java
Mon Feb 16 14:12:59 2015
@@ -22,13 +22,13 @@ import org.apache.wss4j.common.ext.WSSec
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.WSSPolicyException;
 import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.wss4j.stax.impl.securityToken.*;
 import org.apache.xml.security.stax.impl.util.IDGenerator;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 import org.apache.wss4j.policy.stax.PolicyEnforcer;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.securityEvent.*;
@@ -1161,7 +1161,7 @@ public class SupportingTokensTest extend
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("CN=transmitter,OU=swssf,C=CH");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -1207,7 +1207,7 @@ public class SupportingTokensTest extend
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("xs:anyURI");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -1257,7 +1257,7 @@ public class SupportingTokensTest extend
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("CN=transmitter,OU=swssf,C=CH");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);
@@ -1306,7 +1306,7 @@ public class SupportingTokensTest extend
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("xs:anyURI");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InboundWSSecurityContextImplTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InboundWSSecurityContextImplTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InboundWSSecurityContextImplTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InboundWSSecurityContextImplTest.java
Mon Feb 16 14:12:59 2015
@@ -23,6 +23,7 @@ import org.apache.wss4j.common.ext.WSSec
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.stax.WSSec;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.impl.InboundWSSecurityContextImpl;
@@ -43,7 +44,6 @@ import org.apache.xml.security.stax.secu
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 
 import javax.xml.namespace.QName;
 
@@ -561,7 +561,7 @@ public class InboundWSSecurityContextImp
         XMLSecEvent samlTokenXmlEvent = XMLSecEventFactory.createXmlSecStartElement(WSSConstants.TAG_wsse_UsernameToken,
null, null);
 
         SAMLCallback samlCallback = new SAMLCallback();
-        samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+        samlCallback.setSamlVersion(Version.SAML_20);
         samlCallback.setIssuer("xs:anyURI");
         SubjectBean subjectBean = new SubjectBean();
         samlCallback.setSubject(subjectBean);

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLCallbackHandlerImpl.java
Mon Feb 16 14:12:59 2015
@@ -42,11 +42,11 @@ import org.apache.wss4j.common.saml.bean
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
 import org.apache.wss4j.common.saml.bean.SubjectLocalityBean;
+import org.apache.wss4j.common.saml.bean.Version;
 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.message.WSSecEncryptedKey;
-import org.opensaml.common.SAMLVersion;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -64,7 +64,7 @@ public class SAMLCallbackHandlerImpl imp
     private KeyInfoBean.CERT_IDENTIFIER certIdentifier = KeyInfoBean.CERT_IDENTIFIER.X509_CERT;
     private byte[] ephemeralKey = null;
     private String issuer = null;
-    private SAMLVersion samlVersion = SAMLVersion.VERSION_11;
+    private Version samlVersion = Version.SAML_11;
 
     private String subjectNameIDFormat = null;
     private String subjectLocalityIpAddress = null;
@@ -114,11 +114,11 @@ public class SAMLCallbackHandlerImpl imp
                 }
                 samlCallback.setSubject(subjectBean);
 
-                if (getSamlVersion() == SAMLVersion.VERSION_11) {
-                    samlCallback.setSamlVersion(SAMLVersion.VERSION_11);
+                if (getSamlVersion() == Version.SAML_11) {
+                    samlCallback.setSamlVersion(Version.SAML_11);
                     createAndSetStatement(subjectBean, samlCallback);
                 } else {
-                    samlCallback.setSamlVersion(SAMLVersion.VERSION_20);
+                    samlCallback.setSamlVersion(Version.SAML_20);
                     createAndSetStatement(null, samlCallback);
                 }
             } catch (Exception e) {
@@ -287,11 +287,11 @@ public class SAMLCallbackHandlerImpl imp
         this.signAssertion = signAssertion;
     }
 
-    public SAMLVersion getSamlVersion() {
+    public Version getSamlVersion() {
         return samlVersion;
     }
 
-    public void setSamlVersion(SAMLVersion samlVersion) {
+    public void setSamlVersion(Version samlVersion) {
         this.samlVersion = samlVersion;
     }
 

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenHOKTest.java
Mon Feb 16 14:12:59 2015
@@ -26,6 +26,7 @@ import org.apache.wss4j.common.saml.Saml
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.SAMLUtil;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML1Constants;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.dom.handler.WSHandlerConstants;
@@ -48,7 +49,6 @@ import org.apache.wss4j.stax.test.utils.
 import org.apache.xml.security.stax.securityEvent.SecurityEvent;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -589,7 +589,7 @@ public class SAMLTokenHOKTest extends Ab
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
             callbackHandler.setIssuer("www.example.com");
@@ -676,7 +676,7 @@ public class SAMLTokenHOKTest extends Ab
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
             callbackHandler.setCertIdentifier(KeyInfoBean.CERT_IDENTIFIER.X509_ISSUER_SERIAL);
@@ -796,7 +796,7 @@ public class SAMLTokenHOKTest extends Ab
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
             callbackHandler.setCertIdentifier(KeyInfoBean.CERT_IDENTIFIER.KEY_VALUE);
@@ -916,7 +916,7 @@ public class SAMLTokenHOKTest extends Ab
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.ATTR);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
             callbackHandler.setIssuer("www.example.com");

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenReferenceTest.java
Mon Feb 16 14:12:59 2015
@@ -26,6 +26,7 @@ import org.apache.wss4j.common.crypto.Me
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.SAMLUtil;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML1Constants;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.dom.WSConstants;
@@ -48,7 +49,6 @@ import org.apache.wss4j.stax.test.utils.
 import org.apache.xml.security.stax.securityEvent.SecurityEvent;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -518,7 +518,7 @@ public class SAMLTokenReferenceTest exte
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES);
             callbackHandler.setIssuer("www.example.com");
@@ -636,7 +636,7 @@ public class SAMLTokenReferenceTest exte
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
             callbackHandler.setIssuer("www.example.com");
@@ -750,7 +750,7 @@ public class SAMLTokenReferenceTest exte
             WSSConstants.Action[] actions = new WSSConstants.Action[]{WSSConstants.SAML_TOKEN_SIGNED};
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_HOLDER_KEY);
             callbackHandler.setIssuer("www.example.com");

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenSVTest.java
Mon Feb 16 14:12:59 2015
@@ -19,6 +19,7 @@
 package org.apache.wss4j.stax.test.saml;
 
 import org.apache.wss4j.common.crypto.CryptoType;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML1Constants;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.dom.handler.WSHandlerConstants;
@@ -35,7 +36,6 @@ import org.apache.wss4j.stax.test.utils.
 import org.apache.xml.security.stax.securityEvent.SecurityEvent;
 import org.junit.Assert;
 import org.junit.Test;
-import org.opensaml.common.SAMLVersion;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -388,7 +388,7 @@ public class SAMLTokenSVTest extends Abs
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES);
             callbackHandler.setIssuer("www.example.com");
@@ -478,7 +478,7 @@ public class SAMLTokenSVTest extends Abs
             actions.add(WSSConstants.SAML_TOKEN_SIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.ATTR);
             callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES);
             callbackHandler.setIssuer("www.example.com");

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java?rev=1660124&r1=1660123&r2=1660124&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/saml/SAMLTokenTest.java
Mon Feb 16 14:12:59 2015
@@ -25,6 +25,7 @@ import org.apache.wss4j.common.crypto.Cr
 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.Version;
 import org.apache.wss4j.common.saml.builder.SAML1Constants;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.dom.WSConstants;
@@ -54,7 +55,6 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opensaml.Configuration;
 import org.opensaml.common.SAMLObjectBuilder;
-import org.opensaml.common.SAMLVersion;
 import org.opensaml.saml2.core.AttributeValue;
 import org.opensaml.saml2.core.Conditions;
 import org.opensaml.xml.XMLObjectBuilder;
@@ -319,7 +319,7 @@ public class SAMLTokenTest extends Abstr
             actions.add(WSSConstants.SAML_TOKEN_UNSIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setIssuer("www.example.com");
             callbackHandler.setSignAssertion(false);
@@ -394,7 +394,7 @@ public class SAMLTokenTest extends Abstr
             actions.add(WSSConstants.SAML_TOKEN_UNSIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.ATTR);
             callbackHandler.setIssuer("www.example.com");
             callbackHandler.setSignAssertion(false);
@@ -469,7 +469,7 @@ public class SAMLTokenTest extends Abstr
             actions.add(WSSConstants.SAML_TOKEN_UNSIGNED);
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHZ);
             callbackHandler.setIssuer("www.example.com");
             callbackHandler.setSignAssertion(false);
@@ -589,7 +589,7 @@ public class SAMLTokenTest extends Abstr
             securityProperties.setActions(actions);
             SAMLCallbackHandlerImpl callbackHandler = new SAMLCallbackHandlerImpl();
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setIssuer("www.example.com");
             callbackHandler.setSignAssertion(false);
             callbackHandler.setSubjectNameIDFormat(SAML1Constants.NAMEID_FORMAT_EMAIL_ADDRESS);
@@ -668,7 +668,7 @@ public class SAMLTokenTest extends Abstr
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.AUTHN);
             callbackHandler.setIssuer("www.example.com");
             callbackHandler.setSignAssertion(false);
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
             callbackHandler.setSubjectLocality("12.34.56.78", "test-dns");
             securityProperties.setSamlCallbackHandler(callbackHandler);
 
@@ -747,7 +747,7 @@ public class SAMLTokenTest extends Abstr
             callbackHandler.setStatement(SAMLCallbackHandlerImpl.Statement.ATTR);
             callbackHandler.setIssuer("www.example.com");
             callbackHandler.setSignAssertion(false);
-            callbackHandler.setSamlVersion(SAMLVersion.VERSION_20);
+            callbackHandler.setSamlVersion(Version.SAML_20);
 
             // Create and add a custom Attribute (conditions Object)
             XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();



Mime
View raw message