cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1434633 - in /cxf/fediz/branches/1.0.x-fixes: ./ plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java
Date Thu, 17 Jan 2013 12:09:00 GMT
Author: coheigea
Date: Thu Jan 17 12:09:00 2013
New Revision: 1434633

URL: http://svn.apache.org/viewvc?rev=1434633&view=rev
Log:
[FEDIZ-45] - Backmerged from trunk

Modified:
    cxf/fediz/branches/1.0.x-fixes/   (props changed)
    cxf/fediz/branches/1.0.x-fixes/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java

Propchange: cxf/fediz/branches/1.0.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/fediz/trunk:r1434625,1434630

Modified: cxf/fediz/branches/1.0.x-fixes/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/fediz/branches/1.0.x-fixes/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java?rev=1434633&r1=1434632&r2=1434633&view=diff
==============================================================================
--- cxf/fediz/branches/1.0.x-fixes/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java
(original)
+++ cxf/fediz/branches/1.0.x-fixes/plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java
Thu Jan 17 12:09:00 2013
@@ -185,16 +185,16 @@ public class SAMLTokenValidator implemen
                 for (Claim c : claims) {
                     if (roleURI.equals(c.getClaimType())) {
                         Object oValue = c.getValue();
-                        if (oValue instanceof String) {
+                        if ((oValue instanceof String) && !"".equals((String)oValue))
{
                             if (delim == null) {
                                 roles = Collections.singletonList((String)oValue);
                             } else {
                                 roles = parseRoles((String)oValue, delim);
                             }
-                        } else if (oValue instanceof List<?>) {
+                        } else if ((oValue instanceof List<?>) && !((List<?>)oValue).isEmpty())
{
                             List<String> values = (List<String>)oValue;
                             roles = Collections.unmodifiableList(values);
-                        } else {
+                        } else if (!((oValue instanceof String) || (oValue instanceof List<?>)))
{
                             LOG.error("Unsupported value type of Claim value");
                             throw new IllegalStateException("Unsupported value type of Claim
value");
                         }



Mime
View raw message