You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2016/01/13 12:14:35 UTC
svn commit: r1724400 [2/3] - in /webservices/wss4j/branches/2_1_x-fixes:
ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/
ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/enforcer/
ws-security-policy...
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/DerivedKeyTokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/DerivedKeyTokenSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/DerivedKeyTokenSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/DerivedKeyTokenSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -24,6 +24,6 @@ import org.apache.xml.security.stax.secu
public class DerivedKeyTokenSecurityEvent extends TokenSecurityEvent<SecurityToken> {
public DerivedKeyTokenSecurityEvent() {
- super(WSSecurityEventConstants.DerivedKeyToken);
+ super(WSSecurityEventConstants.DERIVED_KEY_TOKEN);
}
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/EncryptedPartSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/EncryptedPartSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/EncryptedPartSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/EncryptedPartSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -29,6 +29,6 @@ public class EncryptedPartSecurityEvent
public EncryptedPartSecurityEvent(
InboundSecurityToken inboundSecurityToken, boolean encrypted,
List<XMLSecurityConstants.ContentType> protectionOrder) {
- super(WSSecurityEventConstants.EncryptedPart, inboundSecurityToken, protectionOrder, false, encrypted);
+ super(WSSecurityEventConstants.ENCRYPTED_PART, inboundSecurityToken, protectionOrder, false, encrypted);
}
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/HttpsTokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/HttpsTokenSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/HttpsTokenSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/HttpsTokenSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -36,7 +36,7 @@ public class HttpsTokenSecurityEvent ext
private String issuerName;
public HttpsTokenSecurityEvent() {
- super(WSSecurityEventConstants.HttpsToken);
+ super(WSSecurityEventConstants.HTTPS_TOKEN);
}
public AuthenticationType getAuthenticationType() {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/KerberosTokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/KerberosTokenSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/KerberosTokenSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/KerberosTokenSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -26,7 +26,7 @@ public class KerberosTokenSecurityEvent
private String issuerName;
public KerberosTokenSecurityEvent() {
- super(WSSecurityEventConstants.KerberosToken);
+ super(WSSecurityEventConstants.KERBEROS_TOKEN);
}
public String getIssuerName() {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/NoSecuritySecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/NoSecuritySecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/NoSecuritySecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/NoSecuritySecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -23,6 +23,6 @@ import org.apache.xml.security.stax.secu
public class NoSecuritySecurityEvent extends SecurityEvent {
public NoSecuritySecurityEvent() {
- super(WSSecurityEventConstants.NoSecurity);
+ super(WSSecurityEventConstants.NO_SECURITY);
}
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/OperationSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/OperationSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/OperationSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/OperationSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -27,7 +27,7 @@ public class OperationSecurityEvent exte
private QName operation;
public OperationSecurityEvent() {
- super(WSSecurityEventConstants.Operation);
+ super(WSSecurityEventConstants.OPERATION);
}
public QName getOperation() {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RelTokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RelTokenSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RelTokenSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RelTokenSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -25,7 +25,7 @@ public class RelTokenSecurityEvent exten
private String issuerName;
public RelTokenSecurityEvent() {
- super(WSSecurityEventConstants.RelToken);
+ super(WSSecurityEventConstants.REL_TOKEN);
}
@Override
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredElementSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredElementSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredElementSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredElementSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -23,6 +23,6 @@ import org.apache.xml.security.stax.secu
public class RequiredElementSecurityEvent extends AbstractElementSecurityEvent {
public RequiredElementSecurityEvent() {
- super(WSSecurityEventConstants.RequiredElement);
+ super(WSSecurityEventConstants.REQUIRED_ELEMENT);
}
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredPartSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredPartSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredPartSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/RequiredPartSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -23,6 +23,6 @@ import org.apache.xml.security.stax.secu
public class RequiredPartSecurityEvent extends AbstractElementSecurityEvent {
public RequiredPartSecurityEvent() {
- super(WSSecurityEventConstants.RequiredPart);
+ super(WSSecurityEventConstants.REQUIRED_PART);
}
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SamlTokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SamlTokenSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SamlTokenSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SamlTokenSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -26,7 +26,7 @@ import org.apache.wss4j.stax.securityTok
public class SamlTokenSecurityEvent extends IssuedTokenSecurityEvent<SamlSecurityToken> {
public SamlTokenSecurityEvent() {
- super(WSSecurityEventConstants.SamlToken);
+ super(WSSecurityEventConstants.SAML_TOKEN);
}
@Override
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SecurityContextTokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SecurityContextTokenSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SecurityContextTokenSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SecurityContextTokenSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -26,7 +26,7 @@ public class SecurityContextTokenSecurit
private String issuerName;
public SecurityContextTokenSecurityEvent() {
- super(WSSecurityEventConstants.SecurityContextToken);
+ super(WSSecurityEventConstants.SECURITY_CONTEXT_TOKEN);
}
public boolean isExternalUriRef() {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignatureConfirmationSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignatureConfirmationSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignatureConfirmationSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignatureConfirmationSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -25,7 +25,7 @@ public class SignatureConfirmationSecuri
private byte[] signatureValue;
public SignatureConfirmationSecurityEvent() {
- super(WSSecurityEventConstants.SignatureConfirmation);
+ super(WSSecurityEventConstants.SIGNATURE_CONFIRMATION);
}
public byte[] getSignatureValue() {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignedPartSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignedPartSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignedPartSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/SignedPartSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -29,6 +29,6 @@ public class SignedPartSecurityEvent ext
public SignedPartSecurityEvent(
InboundSecurityToken inboundSecurityToken, boolean signed,
List<XMLSecurityConstants.ContentType> protectionOrder) {
- super(WSSecurityEventConstants.SignedPart, inboundSecurityToken, protectionOrder, signed, false);
+ super(WSSecurityEventConstants.SIGNED_PART, inboundSecurityToken, protectionOrder, signed, false);
}
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/TimestampSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/TimestampSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/TimestampSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/TimestampSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -28,7 +28,7 @@ public class TimestampSecurityEvent exte
private Calendar expires;
public TimestampSecurityEvent() {
- super(WSSecurityEventConstants.Timestamp);
+ super(WSSecurityEventConstants.TIMESTAMP);
}
public Calendar getCreated() {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/UsernameTokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/UsernameTokenSecurityEvent.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/UsernameTokenSecurityEvent.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/UsernameTokenSecurityEvent.java Wed Jan 13 11:14:34 2016
@@ -27,7 +27,7 @@ public class UsernameTokenSecurityEvent
private String usernameTokenProfile;
public UsernameTokenSecurityEvent() {
- super(WSSecurityEventConstants.UsernameToken);
+ super(WSSecurityEventConstants.USERNAME_TOKEN);
}
public WSSConstants.UsernameTokenPasswordType getUsernameTokenPasswordType() {
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/WSSecurityEventConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/WSSecurityEventConstants.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/WSSecurityEventConstants.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/WSSecurityEventConstants.java Wed Jan 13 11:14:34 2016
@@ -22,21 +22,21 @@ import org.apache.xml.security.stax.secu
public abstract class WSSecurityEventConstants extends SecurityEventConstants {
- public static final Event NoSecurity = new Event("NoSecurity");
- public static final Event Operation = new Event("Operation");
- public static final Event Timestamp = new Event("Timestamp");
- public static final Event SignedPart = new Event("SignedPart");
- public static final Event EncryptedPart = new Event("EncryptedPart");
- public static final Event RequiredElement = new Event("RequiredElement");
- public static final Event RequiredPart = new Event("RequiredPart");
- public static final Event IssuedToken = new Event("IssuedToken");
- public static final Event KerberosToken = new Event("KerberosToken");
- public static final Event SamlToken = new Event("SamlToken");
- public static final Event SecurityContextToken = new Event("SecurityContextToken");
- public static final Event RelToken = new Event("RelToken");
- public static final Event UsernameToken = new Event("UsernameToken");
- public static final Event HttpsToken = new Event("HttpsToken");
- public static final Event DerivedKeyToken = new Event("DerivedKeyToken");
- public static final Event SignatureConfirmation = new Event("SignatureConfirmation");
+ public static final Event NO_SECURITY = new Event("NoSecurity");
+ public static final Event OPERATION = new Event("Operation");
+ public static final Event TIMESTAMP = new Event("Timestamp");
+ public static final Event SIGNED_PART = new Event("SignedPart");
+ public static final Event ENCRYPTED_PART = new Event("EncryptedPart");
+ public static final Event REQUIRED_ELEMENT = new Event("RequiredElement");
+ public static final Event REQUIRED_PART = new Event("RequiredPart");
+ public static final Event ISSUED_TOKEN = new Event("IssuedToken");
+ public static final Event KERBEROS_TOKEN = new Event("KerberosToken");
+ public static final Event SAML_TOKEN = new Event("SamlToken");
+ public static final Event SECURITY_CONTEXT_TOKEN = new Event("SecurityContextToken");
+ public static final Event REL_TOKEN = new Event("RelToken");
+ public static final Event USERNAME_TOKEN = new Event("UsernameToken");
+ public static final Event HTTPS_TOKEN = new Event("HttpsToken");
+ public static final Event DERIVED_KEY_TOKEN = new Event("DerivedKeyToken");
+ public static final Event SIGNATURE_CONFIRMATION = new Event("SignatureConfirmation");
}
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/ConfigurationConverter.java Wed Jan 13 11:14:34 2016
@@ -88,14 +88,12 @@ public final class ConfigurationConverte
if ("".equals(actionToParse)) {
return;
}
- String single[] = actionToParse.split("\\s");
+ String[] single = actionToParse.split("\\s");
List<Action> actions = new ArrayList<Action>();
for (int i = 0; i < single.length; i++) {
if (single[i].equals(ConfigurationConstants.USERNAME_TOKEN)) {
actions.add(WSSConstants.USERNAMETOKEN);
- } /* else if (single[i].equals(ConfigurationConstants.USERNAME_TOKEN_NO_PASSWORD)) {
- actions.add(WSConstants.UT_NOPASSWORD);
- } */else if (single[i].equals(ConfigurationConstants.SIGNATURE)) {
+ } else if (single[i].equals(ConfigurationConstants.SIGNATURE)) {
actions.add(WSSConstants.SIGNATURE);
} else if (single[i].equals(ConfigurationConstants.ENCRYPT)) {
actions.add(WSSConstants.ENCRYPT);
@@ -119,7 +117,9 @@ public final class ConfigurationConverte
actions.add(WSSConstants.KERBEROS_TOKEN);
} else if (single[i].equals(ConfigurationConstants.CUSTOM_TOKEN)) {
actions.add(WSSConstants.CUSTOM_TOKEN);
- }
+ } /* else if (single[i].equals(ConfigurationConstants.USERNAME_TOKEN_NO_PASSWORD)) {
+ actions.add(WSConstants.UT_NOPASSWORD);
+ } */
}
boolean sigConf =
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/InboundWSSec.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/InboundWSSec.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/InboundWSSec.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/InboundWSSec.java Wed Jan 13 11:14:34 2016
@@ -55,20 +55,20 @@ import org.apache.xml.security.stax.secu
*/
public class InboundWSSec {
- protected static final transient org.slf4j.Logger log =
+ protected static final transient org.slf4j.Logger LOG =
org.slf4j.LoggerFactory.getLogger(InboundWSSec.class);
- private static final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
+ private static final XMLInputFactory XML_INPUT_FACTORY = XMLInputFactory.newInstance();
static {
- xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
- xmlInputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
+ XML_INPUT_FACTORY.setProperty(XMLInputFactory.SUPPORT_DTD, false);
+ XML_INPUT_FACTORY.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
try {
- xmlInputFactory.setProperty("org.codehaus.stax2.internNames", true);
- xmlInputFactory.setProperty("org.codehaus.stax2.internNsUris", true);
- xmlInputFactory.setProperty("org.codehaus.stax2.preserveLocation", false);
+ XML_INPUT_FACTORY.setProperty("org.codehaus.stax2.internNames", true);
+ XML_INPUT_FACTORY.setProperty("org.codehaus.stax2.internNsUris", true);
+ XML_INPUT_FACTORY.setProperty("org.codehaus.stax2.preserveLocation", false);
} catch (IllegalArgumentException e) {
- log.debug(e.getMessage(), e);
+ LOG.debug(e.getMessage(), e);
//ignore
}
}
@@ -204,7 +204,7 @@ public class InboundWSSec {
final TokenSecurityEvent<? extends InboundSecurityToken> tokenSecurityEvent =
(TokenSecurityEvent<? extends InboundSecurityToken>)securityEvent;
- if (WSSecurityEventConstants.HttpsToken.equals(securityEvent.getSecurityEventType())) {
+ if (WSSecurityEventConstants.HTTPS_TOKEN.equals(securityEvent.getSecurityEventType())) {
securityContextImpl.registerSecurityEvent(securityEvent);
securityContextImpl.put(WSSConstants.TRANSPORT_SECURITY_ACTIVE, Boolean.TRUE);
}
@@ -238,7 +238,7 @@ public class InboundWSSec {
}
}
- securityContextImpl.put(WSSConstants.XMLINPUTFACTORY, xmlInputFactory);
+ securityContextImpl.put(WSSConstants.XMLINPUTFACTORY, XML_INPUT_FACTORY);
DocumentContextImpl documentContext = new DocumentContextImpl();
documentContext.setEncoding(xmlStreamReader.getEncoding() != null ? xmlStreamReader.getEncoding() : StandardCharsets.UTF_8.name());
@@ -251,7 +251,7 @@ public class InboundWSSec {
inputProcessorChain.addProcessor(new SignatureConfirmationInputProcessor(securityProperties));
}
- if (log.isTraceEnabled()) {
+ if (LOG.isTraceEnabled()) {
LogInputProcessor logInputProcessor = new LogInputProcessor(securityProperties);
logInputProcessor.addAfterProcessor(SecurityHeaderInputProcessor.class.getName());
inputProcessorChain.addProcessor(logInputProcessor);
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/OutboundWSSec.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/OutboundWSSec.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/OutboundWSSec.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/OutboundWSSec.java Wed Jan 13 11:14:34 2016
@@ -71,6 +71,7 @@ import org.apache.xml.security.stax.secu
import org.apache.xml.security.stax.securityEvent.TokenSecurityEvent;
import org.apache.xml.security.stax.securityToken.OutboundSecurityToken;
import org.apache.xml.security.stax.securityToken.SecurityToken;
+import org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenUsage;
import org.apache.xml.security.stax.securityToken.SecurityTokenProvider;
/**
@@ -156,7 +157,8 @@ public class OutboundWSSec {
* @throws WSSecurityException thrown when a Security failure occurs
*/
public XMLStreamWriter processOutMessage(
- XMLStreamWriter xmlStreamWriter, String encoding, OutboundSecurityContext outbounSecurityContext) throws WSSecurityException {
+ XMLStreamWriter xmlStreamWriter, String encoding, OutboundSecurityContext outbounSecurityContext)
+ throws WSSecurityException {
return processOutMessage((Object) xmlStreamWriter, encoding, outbounSecurityContext);
}
@@ -257,7 +259,8 @@ public class OutboundWSSec {
}
encryptionAction = true;
derivedEncryption = true;
- } else if (securityProperties.getDerivedKeyTokenReference() == WSSConstants.DerivedKeyTokenReference.SecurityContextToken) {
+ } else if (securityProperties.getDerivedKeyTokenReference()
+ == WSSConstants.DerivedKeyTokenReference.SecurityContextToken) {
final SecurityContextTokenOutputProcessor securityContextTokenOutputProcessor =
new SecurityContextTokenOutputProcessor();
initializeOutputProcessor(outputProcessorChain, securityContextTokenOutputProcessor, action);
@@ -284,7 +287,8 @@ public class OutboundWSSec {
encryptedKeyOutputProcessor = new EncryptedKeyOutputProcessor();
initializeOutputProcessor(outputProcessorChain, encryptedKeyOutputProcessor, action);
- } else if (securityProperties.getDerivedKeyTokenReference() == WSSConstants.DerivedKeyTokenReference.SecurityContextToken) {
+ } else if (securityProperties.getDerivedKeyTokenReference()
+ == WSSConstants.DerivedKeyTokenReference.SecurityContextToken) {
final SecurityContextTokenOutputProcessor securityContextTokenOutputProcessor =
new SecurityContextTokenOutputProcessor();
initializeOutputProcessor(outputProcessorChain, securityContextTokenOutputProcessor, action);
@@ -679,7 +683,8 @@ public class OutboundWSSec {
@SuppressWarnings("unchecked")
TokenSecurityEvent<? extends SecurityToken> tokenSecurityEvent
= (TokenSecurityEvent<? extends SecurityToken>) securityEvent;
- if (!tokenSecurityEvent.getSecurityToken().getTokenUsages().contains(WSSecurityTokenConstants.TokenUsage_MainSignature)) {
+ TokenUsage mainSig = WSSecurityTokenConstants.TokenUsage_MainSignature;
+ if (!tokenSecurityEvent.getSecurityToken().getTokenUsages().contains(mainSig)) {
continue;
}
X509Certificate[] x509Certificates = tokenSecurityEvent.getSecurityToken().getX509Certificates();
@@ -701,7 +706,8 @@ public class OutboundWSSec {
@SuppressWarnings("unchecked")
TokenSecurityEvent<? extends SecurityToken> tokenSecurityEvent
= (TokenSecurityEvent<? extends SecurityToken>) securityEvent;
- if (!tokenSecurityEvent.getSecurityToken().getTokenUsages().contains(WSSecurityTokenConstants.TokenUsage_MainSignature)) {
+ TokenUsage mainSig = WSSecurityTokenConstants.TokenUsage_MainSignature;
+ if (!tokenSecurityEvent.getSecurityToken().getTokenUsages().contains(mainSig)) {
continue;
}
PublicKey publicKey = tokenSecurityEvent.getSecurityToken().getPublicKey();
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/WSSec.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/WSSec.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/WSSec.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/setup/WSSec.java Wed Jan 13 11:14:34 2016
@@ -168,7 +168,8 @@ public class WSSec {
* @throws org.apache.wss4j.stax.ext.WSSConfigurationException
* if the configuration is invalid
*/
- public static WSSSecurityProperties validateAndApplyDefaultsToOutboundSecurityProperties(WSSSecurityProperties securityProperties) throws WSSConfigurationException {
+ public static WSSSecurityProperties validateAndApplyDefaultsToOutboundSecurityProperties(WSSSecurityProperties securityProperties)
+ throws WSSConfigurationException {
if (securityProperties.getActions() == null || securityProperties.getActions().isEmpty()) {
throw new WSSConfigurationException(WSSConfigurationException.ErrorCode.FAILURE, "noOutputAction");
}
@@ -369,8 +370,8 @@ public class WSSec {
securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
}
checkDefaultSecureParts(true, securityProperties);
- } else if (WSSConstants.SAML_TOKEN_UNSIGNED.equals(action) &&
- securityProperties.getSamlCallbackHandler() == null) {
+ } else if (WSSConstants.SAML_TOKEN_UNSIGNED.equals(action)
+ && securityProperties.getSamlCallbackHandler() == null) {
throw new WSSConfigurationException(WSSConfigurationException.ErrorCode.FAILURE, "noSAMLCallbackHandler");
} else if (WSSConstants.SIGNATURE_WITH_KERBEROS_TOKEN.equals(action)) {
if (securityProperties.getCallbackHandler() == null) {
@@ -433,7 +434,8 @@ public class WSSec {
* @throws org.apache.wss4j.stax.ext.WSSConfigurationException
* if the configuration is invalid
*/
- public static WSSSecurityProperties validateAndApplyDefaultsToInboundSecurityProperties(WSSSecurityProperties securityProperties) throws WSSConfigurationException {
+ public static WSSSecurityProperties validateAndApplyDefaultsToInboundSecurityProperties(WSSSecurityProperties securityProperties)
+ throws WSSConfigurationException {
return new WSSSecurityProperties(securityProperties);
}
@@ -477,11 +479,16 @@ public class WSSec {
new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/xenc-schema.xsd", WSSec.class)),
new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/xenc-schema-11.xsd", WSSec.class)),
new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/xmldsig11-schema.xsd", WSSec.class)),
- new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd", WSSec.class)),
- new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd", WSSec.class)),
- new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/oasis-wss-wssecurity-secext-1.1.xsd", WSSec.class)),
- new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/ws-secureconversation-200502.xsd", WSSec.class)),
- new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/ws-secureconversation-1.3.xsd", WSSec.class)),
+ new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd",
+ WSSec.class)),
+ new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd",
+ WSSec.class)),
+ new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/oasis-wss-wssecurity-secext-1.1.xsd",
+ WSSec.class)),
+ new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/ws-secureconversation-200502.xsd",
+ WSSec.class)),
+ new StreamSource(ClassLoaderUtils.getResourceAsStream("schemas/ws-secureconversation-1.3.xsd",
+ WSSec.class)),
}
);
return schema;
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java Wed Jan 13 11:14:34 2016
@@ -179,8 +179,8 @@ public class DerivedKeyTokenTest extends
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(
@@ -194,8 +194,8 @@ public class DerivedKeyTokenTest extends
securityEventListener.compare();
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
@@ -256,8 +256,8 @@ public class DerivedKeyTokenTest extends
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(
@@ -271,8 +271,8 @@ public class DerivedKeyTokenTest extends
securityEventListener.compare();
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
@@ -920,9 +920,9 @@ public class DerivedKeyTokenTest extends
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
@@ -938,10 +938,10 @@ public class DerivedKeyTokenTest extends
securityEventListener.compare();
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- SignedPartSecurityEvent signedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.SignedPart);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ SignedPartSecurityEvent signedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.SIGNED_PART);
SignatureValueSecurityEvent signatureValueSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.SignatureValue);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String signedElementCorrelationID = signedPartSecurityEvent.getCorrelationID();
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java Wed Jan 13 11:14:34 2016
@@ -169,8 +169,8 @@ public class EncDecryptionTest extends A
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
@@ -190,10 +190,10 @@ public class EncDecryptionTest extends A
List<SecurityEvent> receivedSecurityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < receivedSecurityEvents.size(); i++) {
SecurityEvent securityEvent = receivedSecurityEvents.get(i);
- if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.Operation) {
+ if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.OPERATION) {
OperationSecurityEvent operationSecurityEvent = (OperationSecurityEvent) securityEvent;
Assert.assertEquals(operationSecurityEvent.getOperation(), new QName("http://schemas.xmlsoap.org/wsdl/", "definitions"));
- } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.EncryptedPart) {
+ } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.ENCRYPTED_PART) {
EncryptedPartSecurityEvent encryptedPartSecurityEvent = (EncryptedPartSecurityEvent) securityEvent;
Assert.assertNotNull(encryptedPartSecurityEvent.getXmlSecEvent());
Assert.assertNotNull(encryptedPartSecurityEvent.getSecurityToken());
@@ -205,8 +205,8 @@ public class EncDecryptionTest extends A
}
}
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
@@ -315,8 +315,8 @@ public class EncDecryptionTest extends A
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
@@ -336,10 +336,10 @@ public class EncDecryptionTest extends A
List<SecurityEvent> receivedSecurityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < receivedSecurityEvents.size(); i++) {
SecurityEvent securityEvent = receivedSecurityEvents.get(i);
- if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.Operation) {
+ if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.OPERATION) {
OperationSecurityEvent operationSecurityEvent = (OperationSecurityEvent) securityEvent;
Assert.assertEquals(operationSecurityEvent.getOperation(), new QName("http://schemas.xmlsoap.org/wsdl/", "definitions"));
- } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.EncryptedPart) {
+ } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.ENCRYPTED_PART) {
EncryptedPartSecurityEvent encryptedPartSecurityEvent = (EncryptedPartSecurityEvent) securityEvent;
Assert.assertNotNull(encryptedPartSecurityEvent.getXmlSecEvent());
Assert.assertNotNull(encryptedPartSecurityEvent.getSecurityToken());
@@ -351,8 +351,8 @@ public class EncDecryptionTest extends A
}
}
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
@@ -452,7 +452,7 @@ public class EncDecryptionTest extends A
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.OPERATION,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
@@ -524,7 +524,7 @@ public class EncDecryptionTest extends A
List<SecurityEvent> receivedSecurityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < receivedSecurityEvents.size(); i++) {
SecurityEvent securityEvent = receivedSecurityEvents.get(i);
- if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.Operation) {
+ if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.OPERATION) {
OperationSecurityEvent operationSecurityEvent = (OperationSecurityEvent) securityEvent;
Assert.assertEquals(operationSecurityEvent.getOperation(), new QName("http://schemas.xmlsoap.org/wsdl/", "definitions"));
} else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.ContentEncrypted) {
@@ -540,7 +540,7 @@ public class EncDecryptionTest extends A
}
List<ContentEncryptedElementSecurityEvent> contentEncryptedElementSecurityEventList = securityEventListener.getSecurityEvents(SecurityEventConstants.ContentEncrypted);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID1 = contentEncryptedElementSecurityEventList.get(0).getCorrelationID();
String encryptedPartCorrelationID2 = contentEncryptedElementSecurityEventList.get(1).getCorrelationID();
String encryptedPartCorrelationID3 = contentEncryptedElementSecurityEventList.get(2).getCorrelationID();
@@ -767,7 +767,7 @@ public class EncDecryptionTest extends A
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.OPERATION,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
@@ -839,7 +839,7 @@ public class EncDecryptionTest extends A
List<SecurityEvent> receivedSecurityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < receivedSecurityEvents.size(); i++) {
SecurityEvent securityEvent = receivedSecurityEvents.get(i);
- if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.Operation) {
+ if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.OPERATION) {
OperationSecurityEvent operationSecurityEvent = (OperationSecurityEvent) securityEvent;
Assert.assertEquals(operationSecurityEvent.getOperation(), new QName("http://schemas.xmlsoap.org/wsdl/", "definitions"));
} else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.EncryptedElement) {
@@ -886,8 +886,8 @@ public class EncDecryptionTest extends A
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
@@ -907,10 +907,10 @@ public class EncDecryptionTest extends A
List<SecurityEvent> receivedSecurityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < receivedSecurityEvents.size(); i++) {
SecurityEvent securityEvent = receivedSecurityEvents.get(i);
- if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.Operation) {
+ if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.OPERATION) {
OperationSecurityEvent operationSecurityEvent = (OperationSecurityEvent) securityEvent;
Assert.assertEquals(operationSecurityEvent.getOperation(), new QName("http://schemas.xmlsoap.org/wsdl/", "definitions"));
- } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.EncryptedPart) {
+ } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.ENCRYPTED_PART) {
EncryptedPartSecurityEvent encryptedPartSecurityEvent = (EncryptedPartSecurityEvent) securityEvent;
Assert.assertNotNull(encryptedPartSecurityEvent.getXmlSecEvent());
Assert.assertNotNull(encryptedPartSecurityEvent.getSecurityToken());
@@ -922,8 +922,8 @@ public class EncDecryptionTest extends A
}
}
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
@@ -1761,8 +1761,8 @@ public class EncDecryptionTest extends A
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
@@ -1782,10 +1782,10 @@ public class EncDecryptionTest extends A
List<SecurityEvent> receivedSecurityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < receivedSecurityEvents.size(); i++) {
SecurityEvent securityEvent = receivedSecurityEvents.get(i);
- if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.Operation) {
+ if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.OPERATION) {
OperationSecurityEvent operationSecurityEvent = (OperationSecurityEvent) securityEvent;
Assert.assertEquals(operationSecurityEvent.getOperation(), new QName("http://schemas.xmlsoap.org/wsdl/", "definitions"));
- } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.EncryptedPart) {
+ } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.ENCRYPTED_PART) {
EncryptedPartSecurityEvent encryptedPartSecurityEvent = (EncryptedPartSecurityEvent) securityEvent;
Assert.assertNotNull(encryptedPartSecurityEvent.getXmlSecEvent());
Assert.assertNotNull(encryptedPartSecurityEvent.getSecurityToken());
@@ -1797,8 +1797,8 @@ public class EncDecryptionTest extends A
}
}
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
@@ -2425,8 +2425,8 @@ public class EncDecryptionTest extends A
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
@@ -2453,10 +2453,10 @@ public class EncDecryptionTest extends A
List<SecurityEvent> receivedSecurityEvents = securityEventListener.getReceivedSecurityEvents();
for (int i = 0; i < receivedSecurityEvents.size(); i++) {
SecurityEvent securityEvent = receivedSecurityEvents.get(i);
- if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.Operation) {
+ if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.OPERATION) {
OperationSecurityEvent operationSecurityEvent = (OperationSecurityEvent) securityEvent;
Assert.assertEquals(operationSecurityEvent.getOperation(), new QName("http://schemas.xmlsoap.org/wsdl/", "definitions"));
- } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.EncryptedPart) {
+ } else if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.ENCRYPTED_PART) {
EncryptedPartSecurityEvent encryptedPartSecurityEvent = (EncryptedPartSecurityEvent) securityEvent;
Assert.assertNotNull(encryptedPartSecurityEvent.getXmlSecEvent());
Assert.assertNotNull(encryptedPartSecurityEvent.getSecurityToken());
@@ -2468,8 +2468,8 @@ public class EncDecryptionTest extends A
}
}
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String operationCorrelationID = operationSecurityEvent.getCorrelationID();
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/InteroperabilityTest.java Wed Jan 13 11:14:34 2016
@@ -104,11 +104,11 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.Timestamp,
+ WSSecurityEventConstants.TIMESTAMP,
WSSecurityEventConstants.SignedElement,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(securityProperties,
@@ -127,11 +127,11 @@ public class InteroperabilityTest extend
));
securityEventListener.compare();
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
List<SignedElementSecurityEvent> signedElementSecurityEventList = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SignedElement);
- List<SignedPartSecurityEvent> signedPartSecurityEventList = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SignedPart);
+ List<SignedPartSecurityEvent> signedPartSecurityEventList = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SIGNED_PART);
SignatureValueSecurityEvent signatureValueSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.SignatureValue);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String signedElementCorrelationID1 = signedElementSecurityEventList.get(0).getCorrelationID();
String signedElementCorrelationID2 = signedPartSecurityEventList.get(0).getCorrelationID();
@@ -205,11 +205,11 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.Timestamp,
+ WSSecurityEventConstants.TIMESTAMP,
WSSecurityEventConstants.SignedElement,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(
@@ -263,11 +263,11 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.EncryptedElement,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.Timestamp,
+ WSSecurityEventConstants.TIMESTAMP,
WSSecurityEventConstants.SignedElement,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(
@@ -288,11 +288,11 @@ public class InteroperabilityTest extend
securityEventListener.compare();
EncryptedElementSecurityEvent encryptedElementSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedElement);
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
List<SignedElementSecurityEvent> signedElementSecurityEventList = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SignedElement);
- List<SignedPartSecurityEvent> signedPartSecurityEventList = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SignedPart);
+ List<SignedPartSecurityEvent> signedPartSecurityEventList = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SIGNED_PART);
SignatureValueSecurityEvent signatureValueSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.SignatureValue);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedElementCorrelationID = encryptedElementSecurityEvent.getCorrelationID();
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String signedElementCorrelationID1 = signedElementSecurityEventList.get(0).getCorrelationID();
@@ -405,11 +405,11 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.Timestamp,
+ WSSecurityEventConstants.TIMESTAMP,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(
@@ -428,10 +428,10 @@ public class InteroperabilityTest extend
));
securityEventListener.compare();
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
- List<SignedPartSecurityEvent> signedPartSecurityEvents = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SignedPart);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
+ List<SignedPartSecurityEvent> signedPartSecurityEvents = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SIGNED_PART);
SignatureValueSecurityEvent signatureValueSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.SignatureValue);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String signedElementCorrelationID1 = signedPartSecurityEvents.get(0).getCorrelationID();
String signatureValueCorrelationID = signatureValueSecurityEvent.getCorrelationID();
@@ -576,11 +576,11 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.SignatureValue,
WSSecurityEventConstants.EncryptedElement,
- WSSecurityEventConstants.Timestamp,
+ WSSecurityEventConstants.TIMESTAMP,
WSSecurityEventConstants.SignedElement,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(
@@ -599,11 +599,11 @@ public class InteroperabilityTest extend
securityEventListener.compare();
EncryptedElementSecurityEvent encryptedElementSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedElement);
- EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.EncryptedPart);
+ EncryptedPartSecurityEvent encryptedPartSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.ENCRYPTED_PART);
List<SignedElementSecurityEvent> signedElementSecurityEvents = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SignedElement);
- List<SignedPartSecurityEvent> signedPartSecurityEvents = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SignedPart);
+ List<SignedPartSecurityEvent> signedPartSecurityEvents = securityEventListener.getSecurityEvents(WSSecurityEventConstants.SIGNED_PART);
SignatureValueSecurityEvent signatureValueSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.SignatureValue);
- OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.Operation);
+ OperationSecurityEvent operationSecurityEvent = securityEventListener.getSecurityEvent(WSSecurityEventConstants.OPERATION);
String encryptedElementCorrelationID = encryptedElementSecurityEvent.getCorrelationID();
String encryptedPartCorrelationID = encryptedPartSecurityEvent.getCorrelationID();
String signedElementCorrelationID1 = signedElementSecurityEvents.get(0).getCorrelationID();
@@ -848,8 +848,8 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.AlgorithmSuite,
WSSecurityEventConstants.SignedElement,
@@ -975,11 +975,11 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.Timestamp,
+ WSSecurityEventConstants.TIMESTAMP,
WSSecurityEventConstants.SignedElement,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(
@@ -1020,8 +1020,8 @@ public class InteroperabilityTest extend
securityProperties.loadDecryptionKeystore(this.getClass().getClassLoader().getResource("receiver.jks"), "default".toCharArray());
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
- WSSecurityEventConstants.NoSecurity,
- WSSecurityEventConstants.Operation
+ WSSecurityEventConstants.NO_SECURITY,
+ WSSecurityEventConstants.OPERATION
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(
@@ -1073,11 +1073,11 @@ public class InteroperabilityTest extend
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.X509Token,
WSSecurityEventConstants.SignatureValue,
- WSSecurityEventConstants.Timestamp,
+ WSSecurityEventConstants.TIMESTAMP,
WSSecurityEventConstants.SignedElement,
- WSSecurityEventConstants.SignedPart,
- WSSecurityEventConstants.EncryptedPart,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SIGNED_PART,
+ WSSecurityEventConstants.ENCRYPTED_PART,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
Document document = doInboundSecurity(
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PrincipalTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PrincipalTest.java?rev=1724400&r1=1724399&r2=1724400&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PrincipalTest.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PrincipalTest.java Wed Jan 13 11:14:34 2016
@@ -83,8 +83,8 @@ public class PrincipalTest extends Abstr
InboundWSSec wsSecIn = WSSec.getInboundWSSec(securityProperties);
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
- WSSecurityEventConstants.UsernameToken,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.USERNAME_TOKEN,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(xmlInputFactory.createXMLStreamReader(new ByteArrayInputStream(baos.toByteArray())), null, securityEventListener);
@@ -93,7 +93,7 @@ public class PrincipalTest extends Abstr
// Check principal
UsernameTokenSecurityEvent event =
- (UsernameTokenSecurityEvent)securityEventListener.getSecurityEvent(WSSecurityEventConstants.UsernameToken);
+ (UsernameTokenSecurityEvent)securityEventListener.getSecurityEvent(WSSecurityEventConstants.USERNAME_TOKEN);
Assert.assertNotNull(event);
UsernameSecurityToken usernameSecurityToken = event.getSecurityToken();
Principal principal = usernameSecurityToken.getPrincipal();
@@ -141,8 +141,8 @@ public class PrincipalTest extends Abstr
InboundWSSec wsSecIn = WSSec.getInboundWSSec(securityProperties);
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
- WSSecurityEventConstants.SamlToken,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.SAML_TOKEN,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(xmlInputFactory.createXMLStreamReader(new ByteArrayInputStream(baos.toByteArray())), null, securityEventListener);
@@ -151,7 +151,7 @@ public class PrincipalTest extends Abstr
// Check principal
SamlTokenSecurityEvent event =
- (SamlTokenSecurityEvent)securityEventListener.getSecurityEvent(WSSecurityEventConstants.SamlToken);
+ (SamlTokenSecurityEvent)securityEventListener.getSecurityEvent(WSSecurityEventConstants.SAML_TOKEN);
Assert.assertNotNull(event);
SamlSecurityToken token = event.getSecurityToken();
@@ -187,7 +187,7 @@ public class PrincipalTest extends Abstr
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
WSSecurityEventConstants.X509Token,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(xmlInputFactory.createXMLStreamReader(new ByteArrayInputStream(baos.toByteArray())), null, securityEventListener);
@@ -233,7 +233,7 @@ public class PrincipalTest extends Abstr
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
WSSecurityEventConstants.KeyValueToken,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(xmlInputFactory.createXMLStreamReader(new ByteArrayInputStream(baos.toByteArray())), null, securityEventListener);
@@ -281,7 +281,7 @@ public class PrincipalTest extends Abstr
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
WSSecurityEventConstants.KeyValueToken,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(xmlInputFactory.createXMLStreamReader(new ByteArrayInputStream(baos.toByteArray())), null, securityEventListener);
@@ -341,7 +341,7 @@ public class PrincipalTest extends Abstr
WSSecurityEventConstants.Event[] expectedSecurityEvents = new WSSecurityEventConstants.Event[]{
WSSecurityEventConstants.KeyValueToken,
- WSSecurityEventConstants.Operation,
+ WSSecurityEventConstants.OPERATION,
};
final TestSecurityEventListener securityEventListener = new TestSecurityEventListener(expectedSecurityEvents);
XMLStreamReader xmlStreamReader = wsSecIn.processInMessage(xmlInputFactory.createXMLStreamReader(new ByteArrayInputStream(baos.toByteArray())), null, securityEventListener);