cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1525876 - in /cxf/trunk: rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/ rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/ services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ services...
Date Tue, 24 Sep 2013 12:59:51 GMT
Author: coheigea
Date: Tue Sep 24 12:59:51 2013
New Revision: 1525876

URL: http://svn.apache.org/r1525876
Log:
Compilation fixes after recent WSS4J change to SAML's AttributeBean

Modified:
    cxf/trunk/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/AbstractSAMLCallbackHandler.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CustomClaimsMapper.java
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler2.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlCallbackHandler.java
    cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java

Modified: cxf/trunk/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
(original)
+++ cxf/trunk/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/AbstractSAMLCallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -67,7 +67,7 @@ public abstract class AbstractSAMLCallba
     protected String subjectLocalityIpAddress;
     protected String subjectLocalityDnsAddress;
     protected String resource;
-    protected List<?> customAttributeValues;
+    protected List<Object> customAttributeValues;
     protected ConditionsBean conditions;
     protected SubjectConfirmationDataBean subjectConfirmationData;
     
@@ -116,7 +116,7 @@ public abstract class AbstractSAMLCallba
         this.resource = resource;
     }
     
-    public void setCustomAttributeValues(List<?> customAttributeValues) {
+    public void setCustomAttributeValues(List<Object> customAttributeValues) {
         this.customAttributeValues = customAttributeValues;
     }
     
@@ -148,9 +148,9 @@ public abstract class AbstractSAMLCallba
                 attributeBean.setQualifiedName("role");
             }
             if (customAttributeValues != null) {
-                attributeBean.setCustomAttributeValues(customAttributeValues);   
+                attributeBean.setAttributeValues(customAttributeValues);   
             } else {
-                attributeBean.setAttributeValues(Collections.singletonList("user"));
+                attributeBean.addAttributeValue("user");
             }
             attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
             callback.setAttributeStatementData(Collections.singletonList(attrBean));

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/AbstractSAMLCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/AbstractSAMLCallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/AbstractSAMLCallbackHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/AbstractSAMLCallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -109,7 +109,8 @@ public abstract class AbstractSAMLCallba
                 } else {
                     attributeBean.setQualifiedName("role");
                 }
-                attributeBean.setAttributeValues(Arrays.asList("user", "admin"));
+                attributeBean.addAttributeValue("user");
+                attributeBean.addAttributeValue("admin");
                 attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
             } else {
 //              <saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
@@ -128,7 +129,7 @@ public abstract class AbstractSAMLCallba
                 } else {
                     attributeBean.setQualifiedName("role");
                 }
-                attributeBean.setAttributeValues(Collections.singletonList("user"));
+                attributeBean.addAttributeValue("user");
                 
                 AttributeBean attributeBean2 = new AttributeBean();
                 if (subjectBean != null) {
@@ -137,7 +138,7 @@ public abstract class AbstractSAMLCallba
                 } else {
                     attributeBean2.setQualifiedName("role");
                 }
-                attributeBean2.setAttributeValues(Collections.singletonList("admin"));
+                attributeBean2.addAttributeValue("admin");
                 attrBean.setSamlAttributes(Arrays.asList(attributeBean, attributeBean2));
             }
             

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java (original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/Claim.java Tue
Sep 24 12:59:51 2013
@@ -38,8 +38,7 @@ public class Claim implements Serializab
     private String issuer;
     private String originalIssuer;
     private transient Principal principal;
-    private List<String> values = new ArrayList<String>(1);
-    private List<?> customValues;
+    private List<Object> values = new ArrayList<Object>(1);
 
     public String getIssuer() {
         return issuer;
@@ -73,25 +72,17 @@ public class Claim implements Serializab
         this.principal = principal;
     }
 
-    public void setValues(List<String> values) {
+    public void setValues(List<Object> values) {
         this.values.clear();
         this.values.addAll(values);
     }
 
-    public void addValue(String s) {
+    public void addValue(Object s) {
         this.values.add(s);
     }
     
-    public List<String> getValues() {
+    public List<Object> getValues() {
         return values;
     }
 
-    public List<?> getCustomValues() {
-        return customValues;
-    }
-
-    public void setCustomValues(List<?> customValues) {
-        this.customValues = customValues;
-    }
-
 }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
Tue Sep 24 12:59:51 2013
@@ -101,9 +101,6 @@ public class ClaimsAttributeStatementPro
             }
             attributeBean.setAttributeValues(claim.getValues());
             
-            if (claim.getCustomValues() != null) {
-                attributeBean.setCustomAttributeValues(claim.getCustomValues());
-            }
             attributeList.add(attributeBean);
         }
         attrBean.setSamlAttributes(attributeList);

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapGroupClaimsHandler.java
Tue Sep 24 12:59:51 2013
@@ -307,7 +307,7 @@ public class LdapGroupClaimsHandler impl
         Claim c = new Claim();
         c.setClaimType(URI.create(this.groupURI));
         c.setPrincipal(principal);
-        c.setValues(filteredGroups);
+        c.setValues(new ArrayList<Object>(filteredGroups));
         // c.setIssuer(issuer);
         // c.setOriginalIssuer(originalIssuer);
         // c.setNamespace(namespace);

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java
Tue Sep 24 12:59:51 2013
@@ -19,7 +19,6 @@
 package org.apache.cxf.sts.token.provider;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 import org.w3c.dom.Element;
@@ -88,7 +87,7 @@ public class DefaultAttributeStatementPr
             attributeBean.setQualifiedName("http://cxf.apache.org/sts");
         }
         
-        attributeBean.setAttributeValues(Collections.singletonList("authenticated"));
+        attributeBean.addAttributeValue("authenticated");
         
         return attributeBean;
     }
@@ -111,13 +110,13 @@ public class DefaultAttributeStatementPr
             parameterBean.setQualifiedName("http://cxf.apache.org/sts");
         }
         if (parameter instanceof UsernameTokenType) {
-            parameterBean.setAttributeValues(
-                Collections.singletonList(((UsernameTokenType)parameter).getUsername().getValue())
+            parameterBean.addAttributeValue(
+                ((UsernameTokenType)parameter).getUsername().getValue()
             );
         } else if (parameter instanceof Element) {
             SamlAssertionWrapper wrapper = new SamlAssertionWrapper((Element)parameter);
             SAMLTokenPrincipal principal = new SAMLTokenPrincipalImpl(wrapper);
-            parameterBean.setAttributeValues(Collections.singletonList(principal.getName()));
+            parameterBean.addAttributeValue(principal.getName());
         }
 
         return parameterBean;

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java
Tue Sep 24 12:59:51 2013
@@ -19,7 +19,6 @@
 package org.apache.cxf.sts.common;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
@@ -135,7 +134,7 @@ public class CustomAttributeProvider imp
             attributeBean.setQualifiedName("http://cxf.apache.org/sts/custom");
         }
         
-        attributeBean.setAttributeValues(Collections.singletonList("authenticated"));
+        attributeBean.addAttributeValue("authenticated");
         
         return attributeBean;
     }
@@ -159,13 +158,13 @@ public class CustomAttributeProvider imp
             parameterBean.setQualifiedName("http://cxf.apache.org/sts/custom/" + claimType);
         }
         if (parameter instanceof UsernameTokenType) {
-            parameterBean.setAttributeValues(
-                Collections.singletonList(((UsernameTokenType)parameter).getUsername().getValue())
+            parameterBean.addAttributeValue(
+                ((UsernameTokenType)parameter).getUsername().getValue()
             );
         } else if (parameter instanceof Element) {
             SamlAssertionWrapper wrapper = new SamlAssertionWrapper((Element)parameter);
             SAMLTokenPrincipal principal = new SAMLTokenPrincipalImpl(wrapper);
-            parameterBean.setAttributeValues(Collections.singletonList(principal.getName()));
+            parameterBean.addAttributeValue(principal.getName());
         }
 
         return parameterBean;
@@ -184,10 +183,6 @@ public class CustomAttributeProvider imp
         }
         attributeBean.setAttributeValues(claim.getValues());
         
-        if (claim.getCustomValues() != null) {
-            attributeBean.setCustomAttributeValues(claim.getCustomValues());
-        }
-
         return attributeBean;
     }
 

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimsHandler.java
Tue Sep 24 12:59:51 2013
@@ -21,7 +21,6 @@ package org.apache.cxf.sts.common;
 import java.net.URI;
 import java.security.Principal;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.cxf.sts.claims.Claim;
@@ -93,7 +92,7 @@ public class CustomClaimsHandler impleme
                         xsIntegerBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME,
XSInteger.TYPE_NAME);
                     attributeValue.setValue(185912592);
                     
-                    claim.setCustomValues(Collections.singletonList(attributeValue));
+                    claim.addValue(attributeValue);
 
                 } else if (ROLE_CLAIM.equals(requestClaim.getClaimType())) {
                     String requestedRole = requestClaim.getClaimValue();

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CustomClaimsMapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CustomClaimsMapper.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CustomClaimsMapper.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/CustomClaimsMapper.java
Tue Sep 24 12:59:51 2013
@@ -44,8 +44,10 @@ public class CustomClaimsMapper implemen
             nc.setIssuer(c.getIssuer());
             nc.setOriginalIssuer(c.getOriginalIssuer());
             nc.setPrincipal(c.getPrincipal());
-            for (String s : c.getValues()) {
-                nc.addValue(s.toUpperCase());            
+            for (Object s : c.getValues()) {
+                if (s instanceof String) {
+                    nc.addValue(((String)s).toUpperCase());
+                }
             }
             targetClaims.add(nc);
         }

Modified: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Saml2CallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -58,7 +58,7 @@ public class Saml2CallbackHandler implem
                 }
                 AttributeBean attributeBean = new AttributeBean();
                 attributeBean.setQualifiedName("role");
-                attributeBean.setAttributeValues(Collections.singletonList("user"));
+                attributeBean.addAttributeValue("user");
                 attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
                 callback.setAttributeStatementData(Collections.singletonList(attrBean));
             }

Modified: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Saml2CallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -65,7 +65,7 @@ public class Saml2CallbackHandler implem
                 }
                 AttributeBean attributeBean = new AttributeBean();
                 attributeBean.setQualifiedName("role");
-                attributeBean.setAttributeValues(Collections.singletonList("user"));
+                attributeBean.addAttributeValue("user");
                 attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
                 callback.setAttributeStatementData(Collections.singletonList(attrBean));
             }

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -114,7 +114,7 @@ public class SamlCallbackHandler impleme
                 roleClaim.setSimpleName("subject-role");
                 roleClaim.setQualifiedName(Claim.DEFAULT_ROLE_NAME);
                 roleClaim.setNameFormat(Claim.DEFAULT_NAME_FORMAT);
-                roleClaim.setAttributeValues(roles);
+                roleClaim.setAttributeValues(new ArrayList<Object>(roles));
                 claims.add(roleClaim);
                 
                 List<String> authMethods = 
@@ -127,7 +127,7 @@ public class SamlCallbackHandler impleme
                 authClaim.setSimpleName("http://claims/authentication");
                 authClaim.setQualifiedName("http://claims/authentication");
                 authClaim.setNameFormat("http://claims/authentication-format");
-                authClaim.setAttributeValues(authMethods);
+                authClaim.setAttributeValues(new ArrayList<Object>(authMethods));
                 claims.add(authClaim);
                 
                 attrBean.setSamlAttributes(claims);

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler2.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler2.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/SamlCallbackHandler2.java
Tue Sep 24 12:59:51 2013
@@ -114,7 +114,7 @@ public class SamlCallbackHandler2 implem
                 roleClaim.setSimpleName("subject-role");
                 roleClaim.setQualifiedName(Claim.DEFAULT_ROLE_NAME);
                 roleClaim.setNameFormat(Claim.DEFAULT_NAME_FORMAT);
-                roleClaim.setAttributeValues(roles);
+                roleClaim.setAttributeValues(new ArrayList<Object>(roles));
                 claims.add(roleClaim);
                 
                 List<String> authMethods = 
@@ -127,7 +127,7 @@ public class SamlCallbackHandler2 implem
                 authClaim.setSimpleName("http://claims/authentication");
                 authClaim.setQualifiedName("http://claims/authentication");
                 authClaim.setNameFormat("http://claims/authentication-format");
-                authClaim.setAttributeValues(authMethods);
+                authClaim.setAttributeValues(new ArrayList<Object>(authMethods));
                 claims.add(authClaim);
                 
                 attrBean.setSamlAttributes(claims);

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlCallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlCallbackHandler.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/SamlCallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -150,7 +150,7 @@ public class SamlCallbackHandler impleme
                 roleClaim.setSimpleName("subject-role");
                 roleClaim.setQualifiedName(Claim.DEFAULT_ROLE_NAME);
                 roleClaim.setNameFormat(Claim.DEFAULT_NAME_FORMAT);
-                roleClaim.setAttributeValues(roles);
+                roleClaim.setAttributeValues(new ArrayList<Object>(roles));
                 claims.add(roleClaim);
                 
                 List<String> authMethods = CastUtils.cast((List<?>)m.getContextualProperty("saml.auth"));
@@ -162,7 +162,7 @@ public class SamlCallbackHandler impleme
                 authClaim.setSimpleName("http://claims/authentication");
                 authClaim.setQualifiedName("http://claims/authentication");
                 authClaim.setNameFormat("http://claims/authentication-format");
-                authClaim.setAttributeValues(authMethods);
+                authClaim.setAttributeValues(new ArrayList<Object>(authMethods));
                 claims.add(authClaim);
                 
                 attrBean.setSamlAttributes(claims);

Modified: cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
(original)
+++ cxf/trunk/systests/ws-security-examples/src/test/java/org/apache/cxf/systest/wssec/examples/saml/SamlCallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -103,7 +103,7 @@ public class SamlCallbackHandler impleme
                     attributeBean.setSimpleName("subject-role");
                     attributeBean.setQualifiedName("http://custom-ns");
                 }
-                attributeBean.setAttributeValues(Collections.singletonList("system-user"));
+                attributeBean.addAttributeValue("system-user");
                 attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
                 callback.setAttributeStatementData(Collections.singletonList(attrBean));
             }

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlCallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -117,7 +117,7 @@ public class SamlCallbackHandler impleme
                     attributeBean.setSimpleName("subject-role");
                     attributeBean.setQualifiedName("http://custom-ns");
                 }
-                attributeBean.setAttributeValues(Collections.singletonList("system-user"));
+                attributeBean.addAttributeValue("system-user");
                 attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
                 callback.setAttributeStatementData(Collections.singletonList(attrBean));
                 

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java?rev=1525876&r1=1525875&r2=1525876&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/saml/client/SamlRoleCallbackHandler.java
Tue Sep 24 12:59:51 2013
@@ -119,7 +119,7 @@ public class SamlRoleCallbackHandler imp
                     attributeBean.setSimpleName(name);
                     attributeBean.setQualifiedName(namespace);
                 }
-                attributeBean.setAttributeValues(Collections.singletonList(roleName));
+                attributeBean.addAttributeValue(roleName);
                 attrBean.setSamlAttributes(Collections.singletonList(attributeBean));
                 callback.setAttributeStatementData(Collections.singletonList(attrBean));
             }



Mime
View raw message