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: Fixing claims issue
Date Fri, 12 Feb 2016 15:29:20 GMT
Fixing claims issue


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

Branch: refs/heads/3.1.x-fixes
Commit: 7c7404970a05900911b97c28a08665f5db3dcaa8
Parents: e89e821
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Feb 12 15:25:23 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Feb 12 15:29:14 2016 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7c740497/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
index b13f54a..631e8fc 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
@@ -220,11 +220,11 @@ public class RESTSecurityTokenServiceImpl extends SecurityTokenServiceImpl
imple
         }
 
         // Claims
-        if (requestedClaims == null) {
+        if (requestedClaims == null || requestedClaims.isEmpty()) {
             requestedClaims = defaultClaims;
         }
 
-        if (requestedClaims != null) {
+        if (requestedClaims != null && !requestedClaims.isEmpty()) {
             ClaimsType claimsType = of.createClaimsType();
             claimsType.setDialect(CLAIM_TYPE_NS);
             JAXBElement<ClaimsType> claims = of.createClaims(claimsType);
@@ -418,6 +418,7 @@ public class RESTSecurityTokenServiceImpl extends SecurityTokenServiceImpl
imple
             this.token = token;
         }
         
+        @SuppressWarnings("unused")
         public String getToken() {
             return token;
         }


Mime
View raw message