cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] cxf git commit: Removing deprecated OpenSAML calls
Date Wed, 13 May 2015 10:16:15 GMT
Removing deprecated OpenSAML calls


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/06bb31c0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/06bb31c0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/06bb31c0

Branch: refs/heads/3.0.x-fixes
Commit: 06bb31c09125924233db7a9031e70ae6e8ce7216
Parents: 84f2049
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed May 13 11:15:53 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed May 13 11:15:53 2015 +0100

----------------------------------------------------------------------
 .../apache/cxf/rs/security/saml/sso/SAML2CallbackHandler.java  | 4 ++--
 .../org/apache/cxf/rt/security/saml/SamlCallbackHandler.java   | 6 +++---
 .../cxf/ws/security/wss4j/saml/SAML1CallbackHandler.java       | 4 ++--
 .../cxf/ws/security/wss4j/saml/SAML2CallbackHandler.java       | 4 ++--
 .../org/apache/cxf/sts/token/provider/SamlCallbackHandler.java | 6 +++---
 .../apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java    | 4 ++--
 .../cxf/systest/sts/sendervouches/Saml2CallbackHandler.java    | 4 ++--
 .../cxf/systest/wssec/examples/saml/SamlCallbackHandler.java   | 4 ++--
 .../apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java | 6 +++---
 .../cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java    | 6 +++---
 10 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAML2CallbackHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAML2CallbackHandler.java
b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAML2CallbackHandler.java
index e1ac491..d298f7d 100644
--- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAML2CallbackHandler.java
+++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAML2CallbackHandler.java
@@ -30,8 +30,8 @@ import org.apache.wss4j.common.crypto.CryptoType;
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
-import org.opensaml.common.SAMLVersion;
 
 /**
  * A Callback Handler implementation for a SAML 2 assertion. By default it creates an
@@ -57,7 +57,7 @@ public class SAML2CallbackHandler extends AbstractSAMLCallbackHandler {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof SAMLCallback) {
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
-                callback.setSamlVersion(SAMLVersion.VERSION_20);
+                callback.setSamlVersion(Version.SAML_20);
                 callback.setIssuer(issuer);
                 if (conditions != null) {
                     callback.setConditions(conditions);

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/rt/security/src/test/java/org/apache/cxf/rt/security/saml/SamlCallbackHandler.java
----------------------------------------------------------------------
diff --git a/rt/security/src/test/java/org/apache/cxf/rt/security/saml/SamlCallbackHandler.java
b/rt/security/src/test/java/org/apache/cxf/rt/security/saml/SamlCallbackHandler.java
index ba8220a..6703ac5 100644
--- a/rt/security/src/test/java/org/apache/cxf/rt/security/saml/SamlCallbackHandler.java
+++ b/rt/security/src/test/java/org/apache/cxf/rt/security/saml/SamlCallbackHandler.java
@@ -31,9 +31,9 @@ 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.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML1Constants;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
-import org.opensaml.common.SAMLVersion;
 
 /**
  * A CallbackHandler instance to mock up a SAML Attribute Assertion.
@@ -60,9 +60,9 @@ public class SamlCallbackHandler implements CallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
                 if (saml2) {
-                    callback.setSamlVersion(SAMLVersion.VERSION_20);
+                    callback.setSamlVersion(Version.SAML_20);
                 } else {
-                    callback.setSamlVersion(SAMLVersion.VERSION_11);
+                    callback.setSamlVersion(Version.SAML_11);
                 }
 
                 callback.setIssuer("sts");

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML1CallbackHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML1CallbackHandler.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML1CallbackHandler.java
index 0a91877..df7720b 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML1CallbackHandler.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML1CallbackHandler.java
@@ -31,8 +31,8 @@ import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML1Constants;
-import org.opensaml.common.SAMLVersion;
 
 /**
  * A Callback Handler implementation for a SAML 1.1 assertion. By default it creates an
@@ -61,7 +61,7 @@ public class SAML1CallbackHandler extends AbstractSAMLCallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
                 callback.setIssuer("www.example.com");
-                callback.setSamlVersion(SAMLVersion.VERSION_11);
+                callback.setSamlVersion(Version.SAML_11);
                 SubjectBean subjectBean = 
                     new SubjectBean(
                         subjectName, subjectQualifier, confirmationMethod

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML2CallbackHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML2CallbackHandler.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML2CallbackHandler.java
index 8ca4c0e..24cb322 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML2CallbackHandler.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SAML2CallbackHandler.java
@@ -31,8 +31,8 @@ import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.saml.SAMLCallback;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
-import org.opensaml.common.SAMLVersion;
 
 /**
  * A Callback Handler implementation for a SAML 2 assertion. By default it creates an
@@ -66,7 +66,7 @@ public class SAML2CallbackHandler extends AbstractSAMLCallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
                 callback.setIssuer("www.example.com");
-                callback.setSamlVersion(SAMLVersion.VERSION_20);
+                callback.setSamlVersion(Version.SAML_20);
                 SubjectBean subjectBean = 
                     new SubjectBean(
                         subjectName, subjectQualifier, confirmationMethod

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SamlCallbackHandler.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SamlCallbackHandler.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SamlCallbackHandler.java
index 3ea6ec1..679df31 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SamlCallbackHandler.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SamlCallbackHandler.java
@@ -34,8 +34,8 @@ import org.apache.wss4j.common.saml.bean.AuthDecisionStatementBean;
 import org.apache.wss4j.common.saml.bean.AuthenticationStatementBean;
 import org.apache.wss4j.common.saml.bean.ConditionsBean;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+import org.apache.wss4j.common.saml.bean.Version;
 import org.apache.wss4j.dom.WSConstants;
-import org.opensaml.common.SAMLVersion;
 
 /**
  * This CallbackHandler implementation is populated with SAML Beans by the SAMLTokenProvider,
and is tasked
@@ -115,9 +115,9 @@ public class SamlCallbackHandler implements CallbackHandler {
                 boolean saml1 = false;
                 if (WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType)
                     || WSConstants.SAML2_NS.equals(tokenType)) {
-                    callback.setSamlVersion(SAMLVersion.VERSION_20);
+                    callback.setSamlVersion(Version.SAML_20);
                 } else {
-                    callback.setSamlVersion(SAMLVersion.VERSION_11);
+                    callback.setSamlVersion(Version.SAML_11);
                     saml1 = true;
                     setSubjectOnBeans();
                 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
index ca456dd..2ffcf74 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
@@ -29,8 +29,8 @@ 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.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
-import org.opensaml.common.SAMLVersion;
 
 /**
  * Create a SAML2 Bearer Assertion.
@@ -42,7 +42,7 @@ public class Saml2CallbackHandler implements CallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
-                callback.setSamlVersion(SAMLVersion.VERSION_20);
+                callback.setSamlVersion(Version.SAML_20);
                 
                 callback.setIssuer("sts");
                 String subjectName = "uid=alice";

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
index 3c091bb..df9ca02 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
@@ -33,8 +33,8 @@ 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.bean.Version;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
-import org.opensaml.common.SAMLVersion;
 
 /**
  * Create a SAML2 Assertion via some authenticated information (Principal).
@@ -52,7 +52,7 @@ public class Saml2CallbackHandler implements CallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
-                callback.setSamlVersion(SAMLVersion.VERSION_20);
+                callback.setSamlVersion(Version.SAML_20);
                 
                 callback.setIssuer("intermediary");
                 String subjectName = "uid=" + principal.getName();

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
----------------------------------------------------------------------
diff --git a/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
b/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
index da9de63..f18b563 100644
--- a/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
+++ b/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
@@ -37,9 +37,9 @@ import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean.CERT_IDENTIFIER;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+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.opensaml.common.SAMLVersion;
 
 /**
  * A CallbackHandler instance that is used by the STS to mock up a SAML Attribute Assertion.
@@ -66,7 +66,7 @@ public class SamlCallbackHandler implements CallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
                 if (!saml2) {
-                    callback.setSamlVersion(SAMLVersion.VERSION_11);
+                    callback.setSamlVersion(Version.SAML_11);
                 }
                 callback.setIssuer("sts");
                 String subjectName = "uid=sts-client,o=mock-sts.com";

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
index dd94386..628e82e 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
@@ -38,9 +38,9 @@ import org.apache.wss4j.common.saml.bean.ConditionsBean;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean.CERT_IDENTIFIER;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+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.opensaml.common.SAMLVersion;
 
 /**
  * A CallbackHandler instance that is used by the STS to mock up a SAML Attribute Assertion.
@@ -81,9 +81,9 @@ public class SamlCallbackHandler implements CallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
                 if (saml2) {
-                    callback.setSamlVersion(SAMLVersion.VERSION_20);
+                    callback.setSamlVersion(Version.SAML_20);
                 } else {
-                    callback.setSamlVersion(SAMLVersion.VERSION_11);
+                    callback.setSamlVersion(Version.SAML_11);
                 }
                 if (conditions != null) {
                     callback.setConditions(conditions);

http://git-wip-us.apache.org/repos/asf/cxf/blob/06bb31c0/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
index 3b59e88..8a35fe2 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
@@ -36,9 +36,9 @@ import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean;
 import org.apache.wss4j.common.saml.bean.KeyInfoBean.CERT_IDENTIFIER;
 import org.apache.wss4j.common.saml.bean.SubjectBean;
+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.opensaml.common.SAMLVersion;
 
 /**
  * A CallbackHandler instance that is used by the STS to mock up a SAML Attribute Assertion.
@@ -76,9 +76,9 @@ public class SamlRoleCallbackHandler implements CallbackHandler {
             if (callbacks[i] instanceof SAMLCallback) {
                 SAMLCallback callback = (SAMLCallback) callbacks[i];
                 if (saml2) {
-                    callback.setSamlVersion(SAMLVersion.VERSION_20);
+                    callback.setSamlVersion(Version.SAML_20);
                 } else {
-                    callback.setSamlVersion(SAMLVersion.VERSION_11);
+                    callback.setSamlVersion(Version.SAML_11);
                 }
                 callback.setIssuer("sts");
                 String subjectName = "uid=sts-client,o=mock-sts.com";


Mime
View raw message