cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1353869 - /cxf/branches/2.6.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
Date Tue, 26 Jun 2012 08:50:26 GMT
Author: owulff
Date: Tue Jun 26 08:50:25 2012
New Revision: 1353869

URL: http://svn.apache.org/viewvc?rev=1353869&view=rev
Log:
[CXF-4395] ClaimsAttributeStatementProvider add claims for subject of onbehalf/actas

Modified:
    cxf/branches/2.6.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java

Modified: cxf/branches/2.6.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java?rev=1353869&r1=1353868&r2=1353869&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
(original)
+++ cxf/branches/2.6.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
Tue Jun 26 08:50:25 2012
@@ -43,7 +43,13 @@ public class ClaimsAttributeStatementPro
             params.setAppliesToAddress(providerParameters.getAppliesToAddress());
             params.setEncryptionProperties(providerParameters.getEncryptionProperties());
             params.setKeyRequirements(providerParameters.getKeyRequirements());
-            params.setPrincipal(providerParameters.getPrincipal());
+            if (providerParameters.getTokenRequirements().getOnBehalfOf() != null) {
+                params.setPrincipal(providerParameters.getTokenRequirements().getOnBehalfOf().getPrincipal());
   
+            } else if (providerParameters.getTokenRequirements().getActAs() != null) {
+                params.setPrincipal(providerParameters.getTokenRequirements().getActAs().getPrincipal());
   
+            } else {
+                params.setPrincipal(providerParameters.getPrincipal());
+            }
             params.setRealm(providerParameters.getRealm());
             params.setStsProperties(providerParameters.getStsProperties());
             params.setTokenRequirements(providerParameters.getTokenRequirements());



Mime
View raw message