cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1153820 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
Date Thu, 04 Aug 2011 10:02:54 GMT
Author: coheigea
Date: Thu Aug  4 10:02:54 2011
New Revision: 1153820

URL: http://svn.apache.org/viewvc?rev=1153820&view=rev
Log:
[CXF-3708] - A validated and transformed SAML Token is not cached in the STSTokenValidator

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=1153820&r1=1153819&r2=1153820&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 Aug  4 10:02:54 2011
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.ws.security.trust;
 
+import java.util.Arrays;
 import java.util.List;
 import org.w3c.dom.Element;
 
@@ -68,8 +69,12 @@ public class STSTokenValidator implement
             Element tokenElement = null;
             int hash = 0;
             if (credential.getAssertion() != null) {
+                AssertionWrapper assertion = credential.getAssertion();
+                byte[] signatureValue = assertion.getSignatureValue();
+                if (signatureValue != null && signatureValue.length > 0) {
+                    hash = Arrays.hashCode(signatureValue);
+                }
                 tokenElement = credential.getAssertion().getElement();
-                hash = credential.getAssertion().hashCode();
             } else if (credential.getUsernametoken() != null) {
                 tokenElement = credential.getUsernametoken().getElement();
                 hash = credential.getUsernametoken().hashCode();



Mime
View raw message