cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject [1/3] git commit: Fixes because of Claims refactoring in CXF 3
Date Tue, 18 Mar 2014 21:18:08 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 1b86b130b -> 712b848d9


Fixes because of Claims refactoring in CXF 3


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

Branch: refs/heads/master
Commit: 00a61f428084fb9c06775031a7ab8862d43b228b
Parents: dac740c
Author: Oliver Wulff <owulff@talend.com>
Authored: Tue Mar 18 22:08:53 2014 +0100
Committer: Oliver Wulff <owulff@talend.com>
Committed: Tue Mar 18 22:08:53 2014 +0100

----------------------------------------------------------------------
 .../fediz/service/sts/FileClaimsHandler.java    | 22 +++++++++---------
 .../sts/realms/RealmFileClaimsHandler.java      | 24 ++++++++++----------
 2 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/00a61f42/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FileClaimsHandler.java
----------------------------------------------------------------------
diff --git a/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FileClaimsHandler.java
b/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FileClaimsHandler.java
index 6aaf65c..e6ca110 100644
--- a/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FileClaimsHandler.java
+++ b/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/FileClaimsHandler.java
@@ -23,12 +23,12 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cxf.sts.claims.Claim;
-import org.apache.cxf.sts.claims.ClaimCollection;
+import org.apache.cxf.rt.security.claims.Claim;
+import org.apache.cxf.rt.security.claims.ClaimCollection;
 import org.apache.cxf.sts.claims.ClaimsHandler;
 import org.apache.cxf.sts.claims.ClaimsParameters;
-import org.apache.cxf.sts.claims.RequestClaim;
-import org.apache.cxf.sts.claims.RequestClaimCollection;
+import org.apache.cxf.sts.claims.ProcessedClaim;
+import org.apache.cxf.sts.claims.ProcessedClaimCollection;
 
 /**
  * A custom ClaimsHandler implementation for use in the tests.
@@ -60,28 +60,28 @@ public class FileClaimsHandler implements ClaimsHandler {
     
 
     @Override
-    public ClaimCollection retrieveClaimValues(RequestClaimCollection claims,
+    public ProcessedClaimCollection retrieveClaimValues(ClaimCollection claims,
             ClaimsParameters parameters) {
 
         if (getUserClaims() == null || parameters.getPrincipal() == null) {
-            return new ClaimCollection();
+            return new ProcessedClaimCollection();
         }
 
         if (claims == null || claims.size() == 0) {
-            return new ClaimCollection();
+            return new ProcessedClaimCollection();
         }
 
         Map<String, String> claimMap = getUserClaims().get(parameters.getPrincipal().getName());
         if (claimMap == null || claimMap.size() == 0) {
-            return new ClaimCollection();
+            return new ProcessedClaimCollection();
         }
 
         if (claims != null && claims.size() > 0) {
-            ClaimCollection claimCollection = new ClaimCollection();
-            for (RequestClaim requestClaim : claims) { 
+            ProcessedClaimCollection claimCollection = new ProcessedClaimCollection();
+            for (Claim requestClaim : claims) { 
                 String claimValue = claimMap.get(requestClaim.getClaimType().toString());
                 if (claimValue != null) {
-                    Claim claim = new Claim();
+                    ProcessedClaim claim = new ProcessedClaim();
                     claim.setClaimType(requestClaim.getClaimType());
                     claim.setIssuer("Test Issuer");
                     claim.setOriginalIssuer("Original Issuer");

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/00a61f42/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/realms/RealmFileClaimsHandler.java
----------------------------------------------------------------------
diff --git a/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/realms/RealmFileClaimsHandler.java
b/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/realms/RealmFileClaimsHandler.java
index b34da6b..1088811 100644
--- a/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/realms/RealmFileClaimsHandler.java
+++ b/services/sts/src/main/java/org/apache/cxf/fediz/service/sts/realms/RealmFileClaimsHandler.java
@@ -25,12 +25,12 @@ import java.util.Map;
 import java.util.logging.Logger;
 
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.sts.claims.Claim;
-import org.apache.cxf.sts.claims.ClaimCollection;
+import org.apache.cxf.rt.security.claims.Claim;
+import org.apache.cxf.rt.security.claims.ClaimCollection;
 import org.apache.cxf.sts.claims.ClaimsHandler;
 import org.apache.cxf.sts.claims.ClaimsParameters;
-import org.apache.cxf.sts.claims.RequestClaim;
-import org.apache.cxf.sts.claims.RequestClaimCollection;
+import org.apache.cxf.sts.claims.ProcessedClaim;
+import org.apache.cxf.sts.claims.ProcessedClaimCollection;
 
 /**
  * A custom ClaimsHandler implementation for use in the tests.
@@ -73,36 +73,36 @@ public class RealmFileClaimsHandler implements ClaimsHandler {
     
 
     @Override
-    public ClaimCollection retrieveClaimValues(RequestClaimCollection claims,
+    public ProcessedClaimCollection retrieveClaimValues(ClaimCollection claims,
             ClaimsParameters parameters) {
         
         if (parameters.getRealm() == null || !parameters.getRealm().equalsIgnoreCase(getRealm()))
{
             LOG.fine("Realm '" + parameters.getRealm() + "' doesn't match with configured
realm '" + getRealm() + "'");
-            return new ClaimCollection();
+            return new ProcessedClaimCollection();
         }
         if (getUserClaims() == null || parameters.getPrincipal() == null) {
-            return new ClaimCollection();
+            return new ProcessedClaimCollection();
         }
 
         if (claims == null || claims.size() == 0) {
             LOG.fine("No claims requested");
-            return new ClaimCollection();
+            return new ProcessedClaimCollection();
         }
 
         Map<String, String> claimMap = getUserClaims().get(parameters.getPrincipal().getName());
         if (claimMap == null || claimMap.size() == 0) {
             LOG.fine("Claims requested for principal '" + parameters.getPrincipal().getName()
                      + "' but not found");
-            return new ClaimCollection();
+            return new ProcessedClaimCollection();
         }
         LOG.fine("Claims found for principal '" + parameters.getPrincipal().getName() + "'");
 
         if (claims != null && claims.size() > 0) {
-            ClaimCollection claimCollection = new ClaimCollection();
-            for (RequestClaim requestClaim : claims) { 
+            ProcessedClaimCollection claimCollection = new ProcessedClaimCollection();
+            for (Claim requestClaim : claims) { 
                 String claimValue = claimMap.get(requestClaim.getClaimType().toString());
                 if (claimValue != null) {
-                    Claim claim = new Claim();
+                    ProcessedClaim claim = new ProcessedClaim();
                     claim.setClaimType(requestClaim.getClaimType());
                     claim.setIssuer("Test Issuer");
                     claim.setOriginalIssuer("Original Issuer");


Mime
View raw message