ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gi...@apache.org
Subject svn commit: r1478100 - /webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
Date Wed, 01 May 2013 17:26:16 GMT
Author: giger
Date: Wed May  1 17:26:16 2013
New Revision: 1478100

URL: http://svn.apache.org/r1478100
Log:
small simplification

Modified:
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java?rev=1478100&r1=1478099&r2=1478100&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
(original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
Wed May  1 17:26:16 2013
@@ -234,11 +234,12 @@ public class SAMLTokenOutputProcessor ex
                 outputProcessorChain.getSecurityContext().put(WSSConstants.PROP_APPEND_SIGNATURE_ON_THIS_ID,
tokenId);
             }
 
+            XMLSecurityConstants.Action action = getAction();
+
             finalSAMLTokenOutputProcessor.setXMLSecurityProperties(getSecurityProperties());
-            finalSAMLTokenOutputProcessor.setAction(getAction());
+            finalSAMLTokenOutputProcessor.setAction(action);
             finalSAMLTokenOutputProcessor.init(outputProcessorChain);
 
-            XMLSecurityConstants.Action action = getAction();
             if (WSSConstants.SAML_TOKEN_SIGNED.equals(action) && senderVouches) {
                 SecurePart securePart =
                         new SecurePart(
@@ -290,7 +291,7 @@ public class SAMLTokenOutputProcessor ex
                                 securityToken.getX509Certificates(), getSecurityProperties().isUseSingleCert());
                     }
                     outputSamlAssertion(samlAssertionWrapper.toDOM(null), subOutputProcessorChain);
-                    if (senderVouches && isSignedSamlAction()) {
+                    if (senderVouches && WSSConstants.SAML_TOKEN_SIGNED.equals(getAction()))
{
                         outputSecurityTokenReference(subOutputProcessorChain, samlAssertionWrapper,
                                 securityTokenReferenceId, samlAssertionWrapper.getId());
                     }
@@ -300,16 +301,6 @@ public class SAMLTokenOutputProcessor ex
         }
     }
     
-    private boolean isSignedSamlAction() {
-        WSSSecurityProperties properties = (WSSSecurityProperties) getSecurityProperties();
-        for (int i = 0; i < properties.getOutAction().length; i++) {
-            if (WSSConstants.SAML_TOKEN_SIGNED.equals(action)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
     private void outputSecurityTokenReference(
             OutputProcessorChain outputProcessorChain, SamlAssertionWrapper samlAssertionWrapper,
             String referenceId, String tokenId) throws XMLStreamException, XMLSecurityException
{



Mime
View raw message