cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1085057 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
Date Thu, 24 Mar 2011 18:01:52 GMT
Author: coheigea
Date: Thu Mar 24 18:01:52 2011
New Revision: 1085057

URL: http://svn.apache.org/viewvc?rev=1085057&view=rev
Log:
Added support to the STSTokenValidator to validate UsernameTokens to the STS.

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java?rev=1085057&r1=1085056&r2=1085057&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
Thu Mar 24 18:01:52 2011
@@ -47,7 +47,11 @@ public class STSTokenValidator implement
         SecurityToken token = new SecurityToken();
         
         try {
-            token.setToken(credential.getAssertion().getElement());
+            if (credential.getAssertion() != null) {
+                token.setToken(credential.getAssertion().getElement());
+            } else if (credential.getUsernametoken() != null) {
+                token.setToken(credential.getUsernametoken().getElement());
+            }
             
             STSClient c = STSUtils.getClient(m, "sts");
             synchronized (c) {



Mime
View raw message