ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1056404 - in /webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security: CustomTokenPrincipal.java processor/SignatureProcessor.java
Date Fri, 07 Jan 2011 17:26:20 GMT
Author: coheigea
Date: Fri Jan  7 17:26:20 2011
New Revision: 1056404

URL: http://svn.apache.org/viewvc?rev=1056404&view=rev
Log:
[WSS-263] - A tentative fix for this issue.

Modified:
    webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/CustomTokenPrincipal.java
    webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/processor/SignatureProcessor.java

Modified: webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/CustomTokenPrincipal.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/CustomTokenPrincipal.java?rev=1056404&r1=1056403&r2=1056404&view=diff
==============================================================================
--- webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/CustomTokenPrincipal.java
(original)
+++ webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/CustomTokenPrincipal.java
Fri Jan  7 17:26:20 2011
@@ -29,6 +29,7 @@ public class CustomTokenPrincipal implem
     private Element tokenElement;
     private String name;
     private Object tokenObject;
+    private byte[] secretKey;
     
     public Object getTokenObject() {
         return tokenObject;
@@ -53,5 +54,13 @@ public class CustomTokenPrincipal implem
     public void setTokenElement(Element tokenElement) {
         this.tokenElement = tokenElement;
     }
+    
+    public void setSecretKey(byte[] secretKey) {
+        this.secretKey = secretKey;
+    }
+    
+    public byte[] getSecretKey() {
+        return secretKey;
+    }
 
 }

Modified: webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/processor/SignatureProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/processor/SignatureProcessor.java?rev=1056404&r1=1056403&r2=1056404&view=diff
==============================================================================
--- webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/processor/SignatureProcessor.java
(original)
+++ webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/processor/SignatureProcessor.java
Fri Jan  7 17:26:20 2011
@@ -613,10 +613,13 @@ public class SignatureProcessor implemen
                     final SAMLAssertion assertion = samlKi.getAssertion();
                     CustomTokenPrincipal principal = new CustomTokenPrincipal(assertion.getId());
                     principal.setTokenObject(assertion);
+                    principal.setSecretKey(secretKey);
                     return principal;
                 } else if (secretKey != null) {
                     // This is the custom key scenario
-                    return new CustomTokenPrincipal(customTokenId);
+                    CustomTokenPrincipal principal = new CustomTokenPrincipal(customTokenId);
+                    principal.setSecretKey(secretKey);
+                    return principal;
                 } else {
                     throw new WSSecurityException("Cannot determine principal");
                 }



Mime
View raw message