cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1353856 - /cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java
Date Tue, 26 Jun 2012 08:21:52 GMT
Author: owulff
Date: Tue Jun 26 08:21:51 2012
New Revision: 1353856

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

Modified:
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java

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=1353856&r1=1353855&r2=1353856&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 Jun 26 08:21:51 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