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/15 11:48:30 UTC

svn commit: r1724772 [3/4] - 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/test/java/org/apache/wss4j/policy/stax/test/ ws-security-stax/src/m...

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/X509TokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/X509TokenTest.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/X509TokenTest.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-policy-stax/src/test/java/org/apache/wss4j/policy/stax/test/X509TokenTest.java Fri Jan 15 10:48:29 2016
@@ -77,13 +77,13 @@ public class X509TokenTest extends Abstr
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
         X509TokenSecurityEvent initiatorX509TokenSecurityEvent = new X509TokenSecurityEvent();
         X509SecurityTokenImpl securityToken = getX509Token(WSSecurityTokenConstants.X509V3Token);
-        securityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+        securityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
         initiatorX509TokenSecurityEvent.setSecurityToken(securityToken);
         policyEnforcer.registerSecurityEvent(initiatorX509TokenSecurityEvent);
 
         X509TokenSecurityEvent recipientX509TokenSecurityEvent = new X509TokenSecurityEvent();
         securityToken = getX509Token(WSSecurityTokenConstants.X509V3Token);
-        securityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainEncryption);
+        securityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_ENCRYPTION);
         recipientX509TokenSecurityEvent.setSecurityToken(securityToken);
         policyEnforcer.registerSecurityEvent(recipientX509TokenSecurityEvent);
 
@@ -147,13 +147,13 @@ public class X509TokenTest extends Abstr
         PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
         X509TokenSecurityEvent initiatorX509TokenSecurityEvent = new X509TokenSecurityEvent();
         X509SecurityTokenImpl securityToken = getX509Token(WSSecurityTokenConstants.X509V1Token);
-        securityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+        securityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
         initiatorX509TokenSecurityEvent.setSecurityToken(securityToken);
         policyEnforcer.registerSecurityEvent(initiatorX509TokenSecurityEvent);
 
         X509TokenSecurityEvent recipientX509TokenSecurityEvent = new X509TokenSecurityEvent();
         securityToken = getX509Token(WSSecurityTokenConstants.X509V3Token);
-        securityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainEncryption);
+        securityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_ENCRYPTION);
         recipientX509TokenSecurityEvent.setSecurityToken(securityToken);
         policyEnforcer.registerSecurityEvent(recipientX509TokenSecurityEvent);
 

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSConstants.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSConstants.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSConstants.java Fri Jan 15 10:48:29 2016
@@ -108,7 +108,7 @@ public class WSSConstants extends XMLSec
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0";
 
     public static final String NS_X509_V3_TYPE = NS_X509TOKEN_PROFILE + "#X509v3";
-    public static final String NS_X509PKIPathv1 = NS_X509TOKEN_PROFILE + "#X509PKIPathv1";
+    public static final String NS_X509_PKIPATH_V1 = NS_X509TOKEN_PROFILE + "#X509PKIPathv1";
     public static final String NS_X509_SKI = NS_X509TOKEN_PROFILE + "#X509SubjectKeyIdentifier";
     public static final String NS_THUMBPRINT = NS11_SOAPMESSAGE_SECURITY + "#ThumbprintSHA1";
 

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/InboundWSSecurityContextImpl.java Fri Jan 15 10:48:29 2016
@@ -86,7 +86,7 @@ public class InboundWSSecurityContextImp
 
                     TokenSecurityEvent<? extends InboundSecurityToken> newTokenSecurityEvent =
                             WSSUtils.createTokenSecurityEvent(securityToken, tokenSecurityEvent.getCorrelationID());
-                    setTokenUsage(newTokenSecurityEvent, WSSecurityTokenConstants.TokenUsage_MainEncryption);
+                    setTokenUsage(newTokenSecurityEvent, WSSecurityTokenConstants.TOKENUSAGE_MAIN_ENCRYPTION);
                     securityEvent = newTokenSecurityEvent;
                     this.messageEncryptionTokenOccured = true;
                 }
@@ -166,13 +166,13 @@ public class InboundWSSecurityContextImp
                 if (WSSecurityEventConstants.HTTPS_TOKEN.equals(securityEvent.getSecurityEventType())) {
                     HttpsTokenSecurityEvent actHttpsTokenSecurityEvent = (HttpsTokenSecurityEvent) tokenSecurityEvent;
                     actHttpsTokenSecurityEvent.getSecurityToken().getTokenUsages().clear();
-                    actHttpsTokenSecurityEvent.getSecurityToken().addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                    actHttpsTokenSecurityEvent.getSecurityToken().addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
                     messageSignatureTokens = addTokenSecurityEvent(actHttpsTokenSecurityEvent, messageSignatureTokens);
                     HttpsTokenSecurityEvent clonedHttpsTokenSecurityEvent = new HttpsTokenSecurityEvent();
                     clonedHttpsTokenSecurityEvent.setAuthenticationType(actHttpsTokenSecurityEvent.getAuthenticationType());
                     clonedHttpsTokenSecurityEvent.setIssuerName(actHttpsTokenSecurityEvent.getIssuerName());
                     clonedHttpsTokenSecurityEvent.setSecurityToken(actHttpsTokenSecurityEvent.getSecurityToken());
-                    clonedHttpsTokenSecurityEvent.getSecurityToken().addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainEncryption);
+                    clonedHttpsTokenSecurityEvent.getSecurityToken().addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_ENCRYPTION);
                     messageEncryptionTokens = addTokenSecurityEvent(actHttpsTokenSecurityEvent, messageEncryptionTokens);
                     httpsTokenSecurityEvent = clonedHttpsTokenSecurityEvent;
                     continue;
@@ -342,17 +342,17 @@ public class InboundWSSecurityContextImp
             this.messageEncryptionTokenOccured = true;
         }
 
-        setTokenUsage(messageSignatureTokens, WSSecurityTokenConstants.TokenUsage_MainSignature);
-        setTokenUsage(messageEncryptionTokens, WSSecurityTokenConstants.TokenUsage_MainEncryption);
-        setTokenUsage(supportingTokens, WSSecurityTokenConstants.TokenUsage_SupportingTokens);
-        setTokenUsage(signedSupportingTokens, WSSecurityTokenConstants.TokenUsage_SignedSupportingTokens);
-        setTokenUsage(endorsingSupportingTokens, WSSecurityTokenConstants.TokenUsage_EndorsingSupportingTokens);
-        setTokenUsage(signedEndorsingSupportingTokens, WSSecurityTokenConstants.TokenUsage_SignedEndorsingSupportingTokens);
-        setTokenUsage(signedEncryptedSupportingTokens, WSSecurityTokenConstants.TokenUsage_SignedEncryptedSupportingTokens);
-        setTokenUsage(encryptedSupportingTokens, WSSecurityTokenConstants.TokenUsage_EncryptedSupportingTokens);
-        setTokenUsage(endorsingEncryptedSupportingTokens, WSSecurityTokenConstants.TokenUsage_EndorsingEncryptedSupportingTokens);
+        setTokenUsage(messageSignatureTokens, WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
+        setTokenUsage(messageEncryptionTokens, WSSecurityTokenConstants.TOKENUSAGE_MAIN_ENCRYPTION);
+        setTokenUsage(supportingTokens, WSSecurityTokenConstants.TOKENUSAGE_SUPPORTING_TOKENS);
+        setTokenUsage(signedSupportingTokens, WSSecurityTokenConstants.TOKENUSAGE_SIGNED_SUPPORTING_TOKENS);
+        setTokenUsage(endorsingSupportingTokens, WSSecurityTokenConstants.TOKENUSAGE_ENDORSING_SUPPORTING_TOKENS);
+        setTokenUsage(signedEndorsingSupportingTokens, WSSecurityTokenConstants.TOKENUSAGE_SIGNED_ENDORSING_SUPPORTING_TOKENS);
+        setTokenUsage(signedEncryptedSupportingTokens, WSSecurityTokenConstants.TOKENUSAGE_SIGNED_ENCRYPTED_SUPPORTING_TOKENS);
+        setTokenUsage(encryptedSupportingTokens, WSSecurityTokenConstants.TOKENUSAGE_ENCRYPTED_SUPPORTING_TOKENS);
+        setTokenUsage(endorsingEncryptedSupportingTokens, WSSecurityTokenConstants.TOKENUSAGE_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS);
         setTokenUsage(signedEndorsingEncryptedSupportingTokens, 
-                      WSSecurityTokenConstants.TokenUsage_SignedEndorsingEncryptedSupportingTokens);
+                      WSSecurityTokenConstants.TOKENUSAGE_SIGNED_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS);
     }
 
     private void removeTokenSecurityEvent(TokenSecurityEvent<? extends InboundSecurityToken> tokenSecurityEvent,
@@ -473,7 +473,7 @@ public class InboundWSSecurityContextImp
 
     private void setTokenUsage(TokenSecurityEvent<? extends InboundSecurityToken> tokenSecurityEvent, 
                                WSSecurityTokenConstants.TokenUsage tokenUsage) throws XMLSecurityException {
-        tokenSecurityEvent.getSecurityToken().getTokenUsages().remove(WSSecurityTokenConstants.TokenUsage_SupportingTokens);
+        tokenSecurityEvent.getSecurityToken().getTokenUsages().remove(WSSecurityTokenConstants.TOKENUSAGE_SUPPORTING_TOKENS);
         tokenSecurityEvent.getSecurityToken().getTokenUsages().remove(WSSecurityTokenConstants.TokenUsage_Signature);
         tokenSecurityEvent.getSecurityToken().getTokenUsages().remove(WSSecurityTokenConstants.TokenUsage_Encryption);
         tokenSecurityEvent.getSecurityToken().addTokenUsage(tokenUsage);

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java Fri Jan 15 10:48:29 2016
@@ -85,7 +85,7 @@ public class DerivedKeyTokenInputHandler
                 //todo implement interface to access all derivedKeys? The same would be needed in UserNameToken
                 this.derivedKeySecurityToken = new AbstractInboundSecurityToken(
                         (WSInboundSecurityContext) inputProcessorChain.getSecurityContext(),
-                        derivedKeyTokenType.getId(), WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference,
+                        derivedKeyTokenType.getId(), WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE,
                         true) {
 
                     private InboundSecurityToken referencedSecurityToken = null;

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SAMLTokenInputHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SAMLTokenInputHandler.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SAMLTokenInputHandler.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SAMLTokenInputHandler.java Fri Jan 15 10:48:29 2016
@@ -765,7 +765,7 @@ public class SAMLTokenInputHandler exten
             for (int i = 0; i < securityTokenProviders.size(); i++) {
                 SecurityTokenProvider<? extends InboundSecurityToken> securityTokenProvider = securityTokenProviders.get(i);
                 SecurityToken securityToken = securityTokenProvider.getSecurityToken();
-                if (WSSecurityTokenConstants.HttpsToken.equals(securityToken.getTokenType())) {
+                if (WSSecurityTokenConstants.HTTPS_TOKEN.equals(securityToken.getTokenType())) {
                     return securityToken;
                 }
             }
@@ -773,12 +773,12 @@ public class SAMLTokenInputHandler exten
         }
         
         private boolean containsSignature(List<TokenUsage> tokenUses) {
-            return tokenUses.contains(WSSecurityTokenConstants.TokenUsage_MainSignature)
+            return tokenUses.contains(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE)
                 || tokenUses.contains(WSSecurityTokenConstants.TokenUsage_Signature)
-                || tokenUses.contains(WSSecurityTokenConstants.TokenUsage_EndorsingEncryptedSupportingTokens)
-                || tokenUses.contains(WSSecurityTokenConstants.TokenUsage_EndorsingSupportingTokens)
-                || tokenUses.contains(WSSecurityTokenConstants.TokenUsage_SignedEndorsingEncryptedSupportingTokens)
-                || tokenUses.contains(WSSecurityTokenConstants.TokenUsage_SignedEndorsingSupportingTokens);
+                || tokenUses.contains(WSSecurityTokenConstants.TOKENUSAGE_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS)
+                || tokenUses.contains(WSSecurityTokenConstants.TOKENUSAGE_ENDORSING_SUPPORTING_TOKENS)
+                || tokenUses.contains(WSSecurityTokenConstants.TOKENUSAGE_SIGNED_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS)
+                || tokenUses.contains(WSSecurityTokenConstants.TOKENUSAGE_SIGNED_ENDORSING_SUPPORTING_TOKENS);
         }
     }
 }

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityTokenReferenceInputHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityTokenReferenceInputHandler.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityTokenReferenceInputHandler.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/SecurityTokenReferenceInputHandler.java Fri Jan 15 10:48:29 2016
@@ -168,7 +168,7 @@ public class SecurityTokenReferenceInput
                                         xmlSecEventList,
                                         (WSInboundSecurityContext) inputProcessorChain.getSecurityContext(),
                                         securityTokenReferenceId,
-                                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                                        WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                             }
 
                             @Override

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/BinarySecurityTokenOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/BinarySecurityTokenOutputProcessor.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/BinarySecurityTokenOutputProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/BinarySecurityTokenOutputProcessor.java Fri Jan 15 10:48:29 2016
@@ -87,7 +87,7 @@ public class BinarySecurityTokenOutputPr
 
             if (securityToken != null) {
                 if (WSSConstants.SIGNATURE.equals(action)
-                    && (includeToken || WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier))
+                    && (includeToken || WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier))
                     && (securityToken.getTokenType() == null 
                     || WSSecurityTokenConstants.X509V3Token.equals(securityToken.getTokenType()))) {
                     FinalBinarySecurityTokenOutputProcessor finalBinarySecurityTokenOutputProcessor = 
@@ -108,7 +108,7 @@ public class BinarySecurityTokenOutputPr
                     finalBinarySecurityTokenOutputProcessor.init(outputProcessorChain);
                     securityToken.setProcessor(finalBinarySecurityTokenOutputProcessor);
                 } else if (WSSConstants.ENCRYPT.equals(action)
-                    && (includeToken || WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier))
+                    && (includeToken || WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier))
                     && (securityToken.getTokenType() == null 
                         || WSSecurityTokenConstants.X509V3Token.equals(securityToken.getTokenType()))) {
                     FinalBinarySecurityTokenOutputProcessor finalBinarySecurityTokenOutputProcessor = 

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/DerivedKeyTokenOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/DerivedKeyTokenOutputProcessor.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/DerivedKeyTokenOutputProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/DerivedKeyTokenOutputProcessor.java Fri Jan 15 10:48:29 2016
@@ -109,7 +109,7 @@ public class DerivedKeyTokenOutputProces
                 AlgoFactory.getInstance(WSSConstants.P_SHA_1);
 
             byte[] secret;
-            if (WSSecurityTokenConstants.SecurityContextToken.equals(wrappingSecurityToken.getTokenType())) {
+            if (WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN.equals(wrappingSecurityToken.getTokenType())) {
                 WSPasswordCallback passwordCallback = new WSPasswordCallback(wsuIdDKT, WSPasswordCallback.SECRET_KEY);
                 WSSUtils.doSecretKeyCallback(((WSSSecurityProperties)securityProperties).getCallbackHandler(), 
                                              passwordCallback, wsuIdDKT);
@@ -258,12 +258,12 @@ public class DerivedKeyTokenOutputProces
             SecurityToken wrappingToken = securityToken.getKeyWrappingToken();
             List<XMLSecAttribute> attributes = new ArrayList<>(2);
             attributes.add(createAttribute(WSSConstants.ATT_WSU_ID, IDGenerator.generateID(null)));
-            if (WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier) && !useSingleCertificate) {
-                attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_X509PKIPathv1));
+            if (WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier) && !useSingleCertificate) {
+                attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_X509_PKIPATH_V1));
             } else if (derivedKeyTokenReference == WSSConstants.DerivedKeyTokenReference.EncryptedKey
-                || WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier.equals(keyIdentifier)) {
+                || WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_WSS_ENC_KEY_VALUE_TYPE));
-            } else if (WSSecurityTokenConstants.KerberosToken.equals(wrappingToken.getTokenType())) {
+            } else if (WSSecurityTokenConstants.KERBEROS_TOKEN.equals(wrappingToken.getTokenType())) {
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_GSS_KERBEROS5_AP_REQ));
             }
             createStartElementAndOutputAsEvent(outputProcessorChain, WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, false, attributes);
@@ -280,18 +280,18 @@ public class DerivedKeyTokenOutputProces
                 WSSUtils.createX509SubjectKeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
             } else if (WSSecurityTokenConstants.KeyIdentifier_X509KeyIdentifier.equals(keyIdentifier)) {
                 WSSUtils.createX509KeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 String identifier = wrappingToken.getSha1Identifier();
                 WSSUtils.createKerberosSha1IdentifierStructure(this, outputProcessorChain, identifier);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER.equals(keyIdentifier)) {
                 WSSUtils.createThumbprintKeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier)) {
                 String valueType;
-                if (WSSecurityTokenConstants.KerberosToken.equals(wrappingToken.getTokenType())) {
+                if (WSSecurityTokenConstants.KERBEROS_TOKEN.equals(wrappingToken.getTokenType())) {
                     valueType = WSSConstants.NS_GSS_KERBEROS5_AP_REQ;
-                } else if (WSSecurityTokenConstants.SpnegoContextToken.equals(wrappingToken.getTokenType())
-                    || WSSecurityTokenConstants.SecurityContextToken.equals(wrappingToken.getTokenType())
-                    || WSSecurityTokenConstants.SecureConversationToken.equals(wrappingToken.getTokenType())) {
+                } else if (WSSecurityTokenConstants.SPNEGO_CONTEXT_TOKEN.equals(wrappingToken.getTokenType())
+                    || WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN.equals(wrappingToken.getTokenType())
+                    || WSSecurityTokenConstants.SECURE_CONVERSATION_TOKEN.equals(wrappingToken.getTokenType())) {
                     boolean use200512Namespace = ((WSSSecurityProperties)getSecurityProperties()).isUse200512Namespace();
                     if (use200512Namespace) {
                         valueType = WSSConstants.NS_WSC_05_12 + "/sct";
@@ -301,11 +301,11 @@ public class DerivedKeyTokenOutputProces
                 } else if (useSingleCertificate) {
                     valueType = WSSConstants.NS_X509_V3_TYPE;
                 } else {
-                    valueType = WSSConstants.NS_X509PKIPathv1;
+                    valueType = WSSConstants.NS_X509_PKIPATH_V1;
                 }
                 boolean included = ((WSSSecurityProperties)getSecurityProperties()).isIncludeSignatureToken();
                 WSSUtils.createBSTReferenceStructure(this, outputProcessorChain, tokenId, valueType, included);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 WSSUtils.createEncryptedKeySha1IdentifierStructure(this, outputProcessorChain, sha1Identifier);
             } else {
                 throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "unsupportedSecurityToken");

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java Fri Jan 15 10:48:29 2016
@@ -380,7 +380,7 @@ public class EncryptOutputProcessor exte
             }
 
             KeyIdentifier keyIdentifier = ((WSSSecurityProperties) getSecurityProperties()).getEncryptionKeyIdentifier();
-            if (WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier.equals(keyIdentifier)) {
+            if (WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 List<XMLSecAttribute> attributes = new ArrayList<>(1);
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_WSS_ENC_KEY_VALUE_TYPE));
                 createStartElementAndOutputAsEvent(outputProcessorChain, WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, 
@@ -393,7 +393,7 @@ public class EncryptOutputProcessor exte
                     WSSUtils.createEncryptedKeySha1IdentifierStructure(this, outputProcessorChain, 
                                                                        getEncryptionPartDef().getSymmetricKey());
                 }
-            } else if (WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 List<XMLSecAttribute> attributes = new ArrayList<>(1);
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_KERBEROS5_AP_REQ));
                 createStartElementAndOutputAsEvent(outputProcessorChain, WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, 
@@ -403,21 +403,21 @@ public class EncryptOutputProcessor exte
                                                                securityToken.getSha1Identifier());
             } else {
                 boolean isSAMLToken = false;
-                if (WSSecurityTokenConstants.KerberosToken.equals(securityToken.getTokenType())) {
+                if (WSSecurityTokenConstants.KERBEROS_TOKEN.equals(securityToken.getTokenType())) {
                     List<XMLSecAttribute> attributes = new ArrayList<>(2);
                     attributes.add(createAttribute(WSSConstants.ATT_WSU_ID, IDGenerator.generateID(null)));
                     attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_GSS_KERBEROS5_AP_REQ));
                     createStartElementAndOutputAsEvent(outputProcessorChain, WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, 
                                                        false, attributes);
-                } else if (WSSecurityTokenConstants.Saml10Token.equals(securityToken.getTokenType())
-                    || WSSecurityTokenConstants.Saml11Token.equals(securityToken.getTokenType())) {
+                } else if (WSSecurityTokenConstants.SAML_10_TOKEN.equals(securityToken.getTokenType())
+                    || WSSecurityTokenConstants.SAML_11_TOKEN.equals(securityToken.getTokenType())) {
                     List<XMLSecAttribute> attributes = new ArrayList<>(2);
                     attributes.add(createAttribute(WSSConstants.ATT_WSU_ID, IDGenerator.generateID(null)));
                     attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE));
                     createStartElementAndOutputAsEvent(outputProcessorChain, WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, 
                                                        false, attributes);
                     isSAMLToken = true;
-                } else if (WSSecurityTokenConstants.Saml20Token.equals(securityToken.getTokenType())) {
+                } else if (WSSecurityTokenConstants.SAML_20_TOKEN.equals(securityToken.getTokenType())) {
                     List<XMLSecAttribute> attributes = new ArrayList<>(2);
                     attributes.add(createAttribute(WSSConstants.ATT_WSU_ID, IDGenerator.generateID(null)));
                     attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE));
@@ -442,7 +442,7 @@ public class EncryptOutputProcessor exte
                 } else {
                     List<XMLSecAttribute> attributes = new ArrayList<>(1);
                     attributes.add(createAttribute(WSSConstants.ATT_NULL_URI, "#" + getEncryptionPartDef().getKeyId()));
-                    if (WSSecurityTokenConstants.KerberosToken.equals(securityToken.getTokenType())) {
+                    if (WSSecurityTokenConstants.KERBEROS_TOKEN.equals(securityToken.getTokenType())) {
                         attributes.add(createAttribute(WSSConstants.ATT_NULL_VALUE_TYPE, WSSConstants.NS_GSS_KERBEROS5_AP_REQ));
                     } else if (WSSecurityTokenConstants.DerivedKeyToken.equals(securityToken.getTokenType())) {
                         boolean use200512Namespace = ((WSSSecurityProperties)getSecurityProperties()).isUse200512Namespace();
@@ -451,9 +451,9 @@ public class EncryptOutputProcessor exte
                         } else {
                             attributes.add(createAttribute(WSSConstants.ATT_NULL_VALUE_TYPE, WSSConstants.NS_WSC_05_02 + "/dk"));
                         }
-                    } else if (WSSecurityTokenConstants.SpnegoContextToken.equals(securityToken.getTokenType())
-                        || WSSecurityTokenConstants.SecurityContextToken.equals(securityToken.getTokenType())
-                        || WSSecurityTokenConstants.SecureConversationToken.equals(securityToken.getTokenType())) {
+                    } else if (WSSecurityTokenConstants.SPNEGO_CONTEXT_TOKEN.equals(securityToken.getTokenType())
+                        || WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN.equals(securityToken.getTokenType())
+                        || WSSecurityTokenConstants.SECURE_CONVERSATION_TOKEN.equals(securityToken.getTokenType())) {
                         boolean use200512Namespace = ((WSSSecurityProperties)getSecurityProperties()).isUse200512Namespace();
                         if (use200512Namespace) {
                             attributes.add(createAttribute(WSSConstants.ATT_NULL_VALUE_TYPE, WSSConstants.NS_WSC_05_12 + "/sct"));

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptedKeyOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptedKeyOutputProcessor.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptedKeyOutputProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptedKeyOutputProcessor.java Fri Jan 15 10:48:29 2016
@@ -372,8 +372,8 @@ public class EncryptedKeyOutputProcessor
 
             List<XMLSecAttribute> attributes = new ArrayList<>(2);
             attributes.add(createAttribute(WSSConstants.ATT_WSU_ID, IDGenerator.generateID(null)));
-            if (WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier) && !useSingleCertificate) {
-                attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_X509PKIPathv1));
+            if (WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier) && !useSingleCertificate) {
+                attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_X509_PKIPATH_V1));
             }
             createStartElementAndOutputAsEvent(outputProcessorChain, WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, false, attributes);
 
@@ -385,17 +385,17 @@ public class EncryptedKeyOutputProcessor
                 WSSUtils.createX509SubjectKeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
             } else if (WSSecurityTokenConstants.KeyIdentifier_X509KeyIdentifier.equals(keyIdentifier)) {
                 WSSUtils.createX509KeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER.equals(keyIdentifier)) {
                 WSSUtils.createThumbprintKeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 //not applicable, fallback to thumbprint...
                 WSSUtils.createThumbprintKeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier)) {
                 String valueType;
                 if (useSingleCertificate) {
                     valueType = WSSConstants.NS_X509_V3_TYPE;
                 } else {
-                    valueType = WSSConstants.NS_X509PKIPathv1;
+                    valueType = WSSConstants.NS_X509_PKIPATH_V1;
                 }
                 WSSUtils.createBSTReferenceStructure(this, outputProcessorChain, tokenId, valueType, true);
             } else {

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SAMLTokenOutputProcessor.java Fri Jan 15 10:48:29 2016
@@ -249,11 +249,11 @@ public class SAMLTokenOutputProcessor ex
 
                         WSSecurityTokenConstants.TokenType tokenType;
                         if (samlCallback.getSamlVersion() == SAMLVersion.VERSION_10) {
-                            tokenType = WSSecurityTokenConstants.Saml10Token;
+                            tokenType = WSSecurityTokenConstants.SAML_10_TOKEN;
                         } else if (samlCallback.getSamlVersion() == SAMLVersion.VERSION_11) {
-                            tokenType = WSSecurityTokenConstants.Saml11Token;
+                            tokenType = WSSecurityTokenConstants.SAML_11_TOKEN;
                         } else {
-                            tokenType = WSSecurityTokenConstants.Saml20Token;
+                            tokenType = WSSecurityTokenConstants.SAML_20_TOKEN;
                         }
                         if (samlKeyInfo.getPrivateKey() != null) {
                             this.samlSecurityToken = new GenericOutboundSecurityToken(
@@ -429,7 +429,7 @@ public class SAMLTokenOutputProcessor ex
         private boolean includeBST() {
             if (senderVouches 
                 && getSecurityProperties().getSignatureKeyIdentifier() 
-                    == WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+                    == WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
                 && securityToken != null
                 && !(WSSConstants.SAML_TOKEN_SIGNED.equals(action)
                     && ((WSSSecurityProperties)getSecurityProperties()).isIncludeSignatureToken())) {
@@ -444,11 +444,11 @@ public class SAMLTokenOutputProcessor ex
             String referenceId, String tokenId) throws XMLStreamException, XMLSecurityException {
 
         List<XMLSecAttribute> attributes = new ArrayList<>(2);
-        WSSecurityTokenConstants.TokenType tokenType = WSSecurityTokenConstants.Saml11Token;
+        WSSecurityTokenConstants.TokenType tokenType = WSSecurityTokenConstants.SAML_11_TOKEN;
         if (samlAssertionWrapper.getSamlVersion() == SAMLVersion.VERSION_11) {
             attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE));
         } else {
-            tokenType = WSSecurityTokenConstants.Saml20Token;
+            tokenType = WSSecurityTokenConstants.SAML_20_TOKEN;
             attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE));
         }
         attributes.add(createAttribute(WSSConstants.ATT_WSU_ID, referenceId));

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityContextTokenOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityContextTokenOutputProcessor.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityContextTokenOutputProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/SecurityContextTokenOutputProcessor.java Fri Jan 15 10:48:29 2016
@@ -71,7 +71,7 @@ public class SecurityContextTokenOutputP
             final String identifier = IDGenerator.generateID(null);
 
             final GenericOutboundSecurityToken securityContextSecurityToken = 
-                new GenericOutboundSecurityToken(wsuId, WSSecurityTokenConstants.SecurityContextToken) {
+                new GenericOutboundSecurityToken(wsuId, WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN) {
 
                 @Override
                 public Key getSecretKey(String algorithmURI) throws XMLSecurityException {

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureEndingOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureEndingOutputProcessor.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureEndingOutputProcessor.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/WSSSignatureEndingOutputProcessor.java Fri Jan 15 10:48:29 2016
@@ -103,22 +103,22 @@ public class WSSSignatureEndingOutputPro
             boolean isSAMLToken = false;
             List<XMLSecAttribute> attributes = new ArrayList<>(2);
             attributes.add(createAttribute(WSSConstants.ATT_WSU_ID, IDGenerator.generateID(null)));
-            if (WSSecurityTokenConstants.Saml10Token.equals(securityToken.getTokenType())
-                || WSSecurityTokenConstants.Saml11Token.equals(securityToken.getTokenType())) {
+            if (WSSecurityTokenConstants.SAML_10_TOKEN.equals(securityToken.getTokenType())
+                || WSSecurityTokenConstants.SAML_11_TOKEN.equals(securityToken.getTokenType())) {
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE));
                 isSAMLToken = true;
-            } else if (WSSecurityTokenConstants.Saml20Token.equals(securityToken.getTokenType())) {
+            } else if (WSSecurityTokenConstants.SAML_20_TOKEN.equals(securityToken.getTokenType())) {
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE));
                 isSAMLToken = true;
-            } else if (WSSecurityTokenConstants.KerberosToken.equals(securityToken.getTokenType())) {
+            } else if (WSSecurityTokenConstants.KERBEROS_TOKEN.equals(securityToken.getTokenType())) {
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_GSS_KERBEROS5_AP_REQ));
             } else if (WSSecurityTokenConstants.EncryptedKeyToken.equals(securityToken.getTokenType())
-                || WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier.equals(keyIdentifier)
+                || WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER.equals(keyIdentifier)
                 || WSSecurityTokenConstants.KeyIdentifier_EncryptedKey.equals(keyIdentifier)) {
                 attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_WSS_ENC_KEY_VALUE_TYPE));
-            } else if (WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier) 
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier) 
                 && !useSingleCertificate) {
-                attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_X509PKIPathv1));
+                attributes.add(createAttribute(WSSConstants.ATT_WSSE11_TOKEN_TYPE, WSSConstants.NS_X509_PKIPATH_V1));
             }
             createStartElementAndOutputAsEvent(outputProcessorChain, WSSConstants.TAG_WSSE_SECURITY_TOKEN_REFERENCE, false, attributes);
 
@@ -127,7 +127,7 @@ public class WSSSignatureEndingOutputPro
             if (isSAMLToken) {
                 // Always use KeyIdentifier regardless of the configured KeyIdentifier value
                 WSSUtils.createSAMLKeyIdentifierStructure(this, outputProcessorChain, securityToken.getTokenType(), tokenId);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 String identifier = securityToken.getSha1Identifier();
                 if (identifier != null) {
                     WSSUtils.createEncryptedKeySha1IdentifierStructure(this, outputProcessorChain, identifier);
@@ -135,7 +135,7 @@ public class WSSSignatureEndingOutputPro
                     Key key = securityToken.getSecretKey(getSecurityProperties().getSignatureAlgorithm());
                     WSSUtils.createEncryptedKeySha1IdentifierStructure(this, outputProcessorChain, key);
                 }
-            } else if (WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER.equals(keyIdentifier)) {
                 String identifier = securityToken.getSha1Identifier();
                 WSSUtils.createKerberosSha1IdentifierStructure(this, outputProcessorChain, identifier);
             } else if (WSSecurityTokenConstants.EncryptedKeyToken.equals(securityToken.getTokenType())
@@ -148,14 +148,14 @@ public class WSSSignatureEndingOutputPro
                 WSSUtils.createX509SubjectKeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
             } else if (WSSecurityTokenConstants.KeyIdentifier_X509KeyIdentifier.equals(keyIdentifier)) {
                 WSSUtils.createX509KeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER.equals(keyIdentifier)) {
                 WSSUtils.createThumbprintKeyIdentifierStructure(this, outputProcessorChain, x509Certificates);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(keyIdentifier)) {
                 String valueType;
                 boolean included = true;
-                if (WSSecurityTokenConstants.Saml20Token.equals(securityToken.getTokenType())) {
+                if (WSSecurityTokenConstants.SAML_20_TOKEN.equals(securityToken.getTokenType())) {
                     valueType = null;
-                } else if (WSSecurityTokenConstants.KerberosToken.equals(securityToken.getTokenType())) {
+                } else if (WSSecurityTokenConstants.KERBEROS_TOKEN.equals(securityToken.getTokenType())) {
                     valueType = WSSConstants.NS_GSS_KERBEROS5_AP_REQ;
                 } else if (WSSecurityTokenConstants.DerivedKeyToken.equals(securityToken.getTokenType())) {
                     boolean use200512Namespace = ((WSSSecurityProperties)getSecurityProperties()).isUse200512Namespace();
@@ -164,9 +164,9 @@ public class WSSSignatureEndingOutputPro
                     } else {
                         valueType = WSSConstants.NS_WSC_05_02 + "/dk";
                     }
-                } else if (WSSecurityTokenConstants.SpnegoContextToken.equals(securityToken.getTokenType())
-                    || WSSecurityTokenConstants.SecurityContextToken.equals(securityToken.getTokenType())
-                    || WSSecurityTokenConstants.SecureConversationToken.equals(securityToken.getTokenType())) {
+                } else if (WSSecurityTokenConstants.SPNEGO_CONTEXT_TOKEN.equals(securityToken.getTokenType())
+                    || WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN.equals(securityToken.getTokenType())
+                    || WSSecurityTokenConstants.SECURE_CONVERSATION_TOKEN.equals(securityToken.getTokenType())) {
                     boolean use200512Namespace = ((WSSSecurityProperties)getSecurityProperties()).isUse200512Namespace();
                     if (use200512Namespace) {
                         valueType = WSSConstants.NS_WSC_05_12 + "/sct";
@@ -178,13 +178,13 @@ public class WSSSignatureEndingOutputPro
                     if (useSingleCertificate) {
                         valueType = WSSConstants.NS_X509_V3_TYPE;
                     } else {
-                        valueType = WSSConstants.NS_X509PKIPathv1;
+                        valueType = WSSConstants.NS_X509_PKIPATH_V1;
                     }
                 }
                 WSSUtils.createBSTReferenceStructure(this, outputProcessorChain, tokenId, valueType, included);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_EmbeddedKeyIdentifierRef.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_EMBEDDED_KEY_IDENTIFIER_REF.equals(keyIdentifier)) {
                 WSSUtils.createEmbeddedKeyIdentifierStructure(this, outputProcessorChain, securityToken.getTokenType(), tokenId);
-            } else if (WSSecurityTokenConstants.KeyIdentifier_UsernameTokenReference.equals(keyIdentifier)) {
+            } else if (WSSecurityTokenConstants.KEYIDENTIFIER_USERNAME_TOKEN_REFERENCE.equals(keyIdentifier)) {
                 WSSUtils.createUsernameTokenReferenceStructure(this, outputProcessorChain, tokenId);
             } else {
                 throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_SIGNATURE, "unsupportedSecurityToken",

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/EncryptedKeySha1SecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/EncryptedKeySha1SecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/EncryptedKeySha1SecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/EncryptedKeySha1SecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -45,7 +45,7 @@ public class EncryptedKeySha1SecurityTok
             WSInboundSecurityContext inboundSecurityContext, CallbackHandler callbackHandler,
             String sha1Identifier, String id) {
 
-        super(inboundSecurityContext, id, WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier, false);
+        super(inboundSecurityContext, id, WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER, false);
         this.callbackHandler = callbackHandler;
         setSha1Identifier(sha1Identifier);
     }

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -79,7 +79,7 @@ public class ExternalSecurityTokenImpl e
     @Override
     public TokenType getTokenType() {
         if ("SecurityContextToken".equals(tokenElement.getLocalName())) {
-            return WSSecurityTokenConstants.SecurityContextToken;
+            return WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN;
         }
         return null;
     }

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/HttpsSecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/HttpsSecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/HttpsSecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/HttpsSecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -66,7 +66,7 @@ public class HttpsSecurityTokenImpl exte
 
     @Override
     public WSSecurityTokenConstants.TokenType getTokenType() {
-        return WSSecurityTokenConstants.HttpsToken;
+        return WSSecurityTokenConstants.HTTPS_TOKEN;
     }
 
     //todo username from principal?

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosClientSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosClientSecurityToken.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosClientSecurityToken.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosClientSecurityToken.java Fri Jan 15 10:48:29 2016
@@ -50,13 +50,13 @@ public class KerberosClientSecurityToken
     private byte[] ticket;
 
     public KerberosClientSecurityToken(byte[] ticket, Key secretKey, String id) {
-        super(id, WSSecurityTokenConstants.KerberosToken);
+        super(id, WSSecurityTokenConstants.KERBEROS_TOKEN);
         this.ticket = ticket;
         this.secretKey = secretKey;
     }
 
     public KerberosClientSecurityToken(CallbackHandler callbackHandler, String id) {
-        super(id, WSSecurityTokenConstants.KerberosToken);
+        super(id, WSSecurityTokenConstants.KERBEROS_TOKEN);
         this.callbackHandler = callbackHandler;
     }
 

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosServiceSecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosServiceSecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosServiceSecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/KerberosServiceSecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -73,7 +73,7 @@ public class KerberosServiceSecurityToke
 
     @Override
     public WSSecurityTokenConstants.TokenType getTokenType() {
-        return WSSecurityTokenConstants.KerberosToken;
+        return WSSecurityTokenConstants.KERBEROS_TOKEN;
     }
 
     protected KerberosTokenDecoder getTGT() throws WSSecurityException {

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/OutboundUsernameSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/OutboundUsernameSecurityToken.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/OutboundUsernameSecurityToken.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/OutboundUsernameSecurityToken.java Fri Jan 15 10:48:29 2016
@@ -39,7 +39,7 @@ public class OutboundUsernameSecurityTok
 
     public OutboundUsernameSecurityToken(String username, String password, String createdTime,
                                          byte[] nonce, String id, byte[] salt, int iterations) {
-        super(id, WSSecurityTokenConstants.UsernameToken);
+        super(id, WSSecurityTokenConstants.USERNAME_TOKEN);
         this.username = username;
         this.password = password;
         this.createdTime = createdTime;

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SamlSecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SamlSecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SamlSecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SamlSecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -222,12 +222,12 @@ public class SamlSecurityTokenImpl exten
     public WSSecurityTokenConstants.TokenType getTokenType() {
         if (samlAssertionWrapper != null
             && samlAssertionWrapper.getSamlVersion() == SAMLVersion.VERSION_10) {
-            return WSSecurityTokenConstants.Saml10Token;
+            return WSSecurityTokenConstants.SAML_10_TOKEN;
         } else if (samlAssertionWrapper != null
             && samlAssertionWrapper.getSamlVersion() == SAMLVersion.VERSION_11) {
-            return WSSecurityTokenConstants.Saml11Token;
+            return WSSecurityTokenConstants.SAML_11_TOKEN;
         }
-        return WSSecurityTokenConstants.Saml20Token;
+        return WSSecurityTokenConstants.SAML_20_TOKEN;
     }
 
     @Override

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecureConversationSecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecureConversationSecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecureConversationSecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecureConversationSecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -34,6 +34,6 @@ public class SecureConversationSecurityT
 
     @Override
     public WSSecurityTokenConstants.TokenType getTokenType() {
-        return WSSecurityTokenConstants.SecureConversationToken;
+        return WSSecurityTokenConstants.SECURE_CONVERSATION_TOKEN;
     }
 }

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java Fri Jan 15 10:48:29 2016
@@ -244,7 +244,7 @@ public class SecurityTokenFactoryImpl ex
 
                                 if (Arrays.equals(tokenDigest, binaryContent)) {
                                     return createSecurityTokenProxy(inboundSecurityToken,
-                                            WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
+                                            WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER);
                                 }
                             }
                         }
@@ -273,20 +273,20 @@ public class SecurityTokenFactoryImpl ex
                             inboundSecurityContext.getSecurityTokenProvider(keyIdentifierType.getValue());
                     if (securityTokenProvider != null) {
                         return createSecurityTokenProxy(securityTokenProvider.getSecurityToken(),
-                            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                     }
 
                     // Delegate to a CallbackHandler, in case the token is not in the request
                     return new SamlSecurityTokenImpl((WSInboundSecurityContext) inboundSecurityContext,
                                                      keyIdentifierType.getValue(),
-                                                     WSSecurityTokenConstants.KeyIdentifier_ExternalReference,
+                                                     WSSecurityTokenConstants.KEYIDENTIFIER_EXTERNAL_REFERENCE,
                                                      securityProperties);
                 } else if (WSSConstants.NS_KERBEROS5_AP_REQ_SHA1.equals(valueType)) {
                     SecurityTokenProvider<? extends InboundSecurityToken> securityTokenProvider =
                             inboundSecurityContext.getSecurityTokenProvider(keyIdentifierType.getValue());
                     if (securityTokenProvider != null) {
                         return createSecurityTokenProxy(securityTokenProvider.getSecurityToken(),
-                                WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                                WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                     }
 
                     try {
@@ -303,7 +303,7 @@ public class SecurityTokenFactoryImpl ex
                                 byte[] tokenDigest = messageDigest.digest(kerberosSecurityToken.getBinaryContent());
                                 if (Arrays.equals(tokenDigest, binaryContent)) {
                                     return createSecurityTokenProxy(inboundSecurityToken,
-                                            WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
+                                            WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER);
                                 }
                             }
                         }
@@ -339,7 +339,7 @@ public class SecurityTokenFactoryImpl ex
                     try {
                         return new ExternalSecurityTokenImpl((WSInboundSecurityContext) inboundSecurityContext,
                                                      uri,
-                                                     WSSecurityTokenConstants.KeyIdentifier_ExternalReference,
+                                                     WSSecurityTokenConstants.KEYIDENTIFIER_EXTERNAL_REFERENCE,
                                                      securityProperties, false);
                     } catch (WSSecurityException ex) { //NOPMD
                         // just continue
@@ -368,17 +368,17 @@ public class SecurityTokenFactoryImpl ex
                     // Delegate to a CallbackHandler, in case the token is not in the request
                     return new ExternalSecurityTokenImpl((WSInboundSecurityContext) inboundSecurityContext,
                                                      uri,
-                                                     WSSecurityTokenConstants.KeyIdentifier_ExternalReference,
+                                                     WSSecurityTokenConstants.KEYIDENTIFIER_EXTERNAL_REFERENCE,
                                                      securityProperties, included);
                 }
                 if (securityTokenProvider.getSecurityToken() instanceof SecurityTokenReference) {
                     ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R3057);
                 } else if (securityTokenProvider.getSecurityToken() instanceof X509PKIPathv1SecurityTokenImpl) {
                     String valueType = referenceType.getValueType();
-                    if (!WSSConstants.NS_X509PKIPathv1.equals(valueType)) {
+                    if (!WSSConstants.NS_X509_PKIPATH_V1.equals(valueType)) {
                         ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R3058);
                     }
-                    if (!WSSConstants.NS_X509PKIPathv1.equals(tokenType)) {
+                    if (!WSSConstants.NS_X509_PKIPATH_V1.equals(tokenType)) {
                         ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R5215);
                     }
                 } else if (securityTokenProvider.getSecurityToken() instanceof X509SecurityToken) {
@@ -393,7 +393,7 @@ public class SecurityTokenFactoryImpl ex
                     }
                 } else if (securityTokenProvider.getSecurityToken() instanceof SamlSecurityToken) {
                     WSSecurityTokenConstants.TokenType samlTokenType = securityTokenProvider.getSecurityToken().getTokenType();
-                    if (WSSecurityTokenConstants.Saml20Token.equals(samlTokenType)) {
+                    if (WSSecurityTokenConstants.SAML_20_TOKEN.equals(samlTokenType)) {
                         String valueType = referenceType.getValueType();
                         if (valueType != null && !"".equals(valueType)) {
                             ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R6614);
@@ -401,14 +401,14 @@ public class SecurityTokenFactoryImpl ex
                         if (!WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE.equals(tokenType)) {
                             ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R6617);
                         }
-                    } else if (WSSecurityTokenConstants.Saml10Token.equals(samlTokenType) 
+                    } else if (WSSecurityTokenConstants.SAML_10_TOKEN.equals(samlTokenType) 
                         && !WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE.equals(tokenType)) {
                         ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R6611);
                     }
                 }
 
                 return createSecurityTokenProxy(securityTokenProvider.getSecurityToken(),
-                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
             }
             throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY, "noKeyinfo");
         } finally {

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/UsernameSecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/UsernameSecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/UsernameSecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/UsernameSecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -91,7 +91,7 @@ public class UsernameSecurityTokenImpl e
 
     @Override
     public WSSecurityTokenConstants.TokenType getTokenType() {
-        return WSSecurityTokenConstants.UsernameToken;
+        return WSSecurityTokenConstants.USERNAME_TOKEN;
     }
 
     /**

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/X509ThumbprintSHA1SecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/X509ThumbprintSHA1SecurityTokenImpl.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/X509ThumbprintSHA1SecurityTokenImpl.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/X509ThumbprintSHA1SecurityTokenImpl.java Fri Jan 15 10:48:29 2016
@@ -39,7 +39,7 @@ public class X509ThumbprintSHA1SecurityT
             byte[] binaryContent, String id, WSSSecurityProperties securityProperties) {
 
         super(WSSecurityTokenConstants.X509V3Token, wsInboundSecurityContext, crypto, callbackHandler, id,
-                WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier, securityProperties, false);
+                WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER, securityProperties, false);
         this.binaryContent = binaryContent;
     }
 

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java?rev=1724772&r1=1724771&r2=1724772&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java Fri Jan 15 10:48:29 2016
@@ -22,34 +22,47 @@ import org.apache.xml.security.stax.secu
 
 public class WSSecurityTokenConstants extends SecurityTokenConstants {
 
-    public static final TokenUsage TokenUsage_MainSignature = new TokenUsage("MainSignature");
-    public static final TokenUsage TokenUsage_MainEncryption = new TokenUsage("MainEncryption");
-    public static final TokenUsage TokenUsage_SupportingTokens = new TokenUsage("SupportingTokens");
-    public static final TokenUsage TokenUsage_SignedSupportingTokens = new TokenUsage("SignedSupportingTokens");
-    public static final TokenUsage TokenUsage_EndorsingSupportingTokens = new TokenUsage("EndorsingSupportingTokens");
-    public static final TokenUsage TokenUsage_SignedEndorsingSupportingTokens = new TokenUsage("SignedEndorsingSupportingTokens");
-    public static final TokenUsage TokenUsage_SignedEncryptedSupportingTokens = new TokenUsage("SignedEncryptedSupportingTokens");
-    public static final TokenUsage TokenUsage_EncryptedSupportingTokens = new TokenUsage("EncryptedSupportingTokens");
-    public static final TokenUsage TokenUsage_EndorsingEncryptedSupportingTokens = new TokenUsage("EndorsingEncryptedSupportingTokens");
-    public static final TokenUsage TokenUsage_SignedEndorsingEncryptedSupportingTokens = new TokenUsage("SignedEndorsingEncryptedSupportingTokens");
+    public static final TokenUsage TOKENUSAGE_MAIN_SIGNATURE = new TokenUsage("MainSignature");
+    public static final TokenUsage TOKENUSAGE_MAIN_ENCRYPTION = new TokenUsage("MainEncryption");
+    public static final TokenUsage TOKENUSAGE_SUPPORTING_TOKENS = new TokenUsage("SupportingTokens");
+    public static final TokenUsage TOKENUSAGE_SIGNED_SUPPORTING_TOKENS = new TokenUsage("SignedSupportingTokens");
+    public static final TokenUsage TOKENUSAGE_ENDORSING_SUPPORTING_TOKENS = 
+        new TokenUsage("EndorsingSupportingTokens");
+    public static final TokenUsage TOKENUSAGE_SIGNED_ENDORSING_SUPPORTING_TOKENS = 
+        new TokenUsage("SignedEndorsingSupportingTokens");
+    public static final TokenUsage TOKENUSAGE_SIGNED_ENCRYPTED_SUPPORTING_TOKENS = 
+        new TokenUsage("SignedEncryptedSupportingTokens");
+    public static final TokenUsage TOKENUSAGE_ENCRYPTED_SUPPORTING_TOKENS = 
+        new TokenUsage("EncryptedSupportingTokens");
+    public static final TokenUsage TOKENUSAGE_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS = 
+        new TokenUsage("EndorsingEncryptedSupportingTokens");
+    public static final TokenUsage TOKENUSAGE_SIGNED_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS = 
+        new TokenUsage("SignedEndorsingEncryptedSupportingTokens");
 
-    public static final KeyIdentifier KeyIdentifier_SecurityTokenDirectReference = new KeyIdentifier("SecurityTokenDirectReference");
-    public static final KeyIdentifier KeyIdentifier_ThumbprintIdentifier = new KeyIdentifier("ThumbprintIdentifier");
-    public static final KeyIdentifier KeyIdentifier_EncryptedKeySha1Identifier = new KeyIdentifier("EncryptedKeySha1Identifier");
-    public static final KeyIdentifier KeyIdentifier_KerberosSha1Identifier = new KeyIdentifier("KerberosSha1Identifier");
-    public static final KeyIdentifier KeyIdentifier_EmbeddedKeyIdentifierRef = new KeyIdentifier("EmbeddedKeyIdentifierRef");
-    public static final KeyIdentifier KeyIdentifier_UsernameTokenReference = new KeyIdentifier("UsernameTokenReference");
-    public static final KeyIdentifier KeyIdentifier_ExternalReference = new KeyIdentifier("ExternalReference");
+    public static final KeyIdentifier KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE = 
+        new KeyIdentifier("SecurityTokenDirectReference");
+    public static final KeyIdentifier KEYIDENTIFIER_THUMBPRINT_IDENTIFIER = 
+        new KeyIdentifier("ThumbprintIdentifier");
+    public static final KeyIdentifier KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER = 
+        new KeyIdentifier("EncryptedKeySha1Identifier");
+    public static final KeyIdentifier KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER = 
+        new KeyIdentifier("KerberosSha1Identifier");
+    public static final KeyIdentifier KEYIDENTIFIER_EMBEDDED_KEY_IDENTIFIER_REF = 
+        new KeyIdentifier("EmbeddedKeyIdentifierRef");
+    public static final KeyIdentifier KEYIDENTIFIER_USERNAME_TOKEN_REFERENCE = 
+        new KeyIdentifier("UsernameTokenReference");
+    public static final KeyIdentifier KEYIDENTIFIER_EXTERNAL_REFERENCE = 
+        new KeyIdentifier("ExternalReference");
 
-    public static final TokenType UsernameToken = new TokenType("UsernameToken");
-    public static final TokenType SecurityContextToken = new TokenType("SecurityContextToken");
-    public static final TokenType Saml10Token = new TokenType("Saml10Token");
-    public static final TokenType Saml11Token = new TokenType("Saml11Token");
-    public static final TokenType Saml20Token = new TokenType("Saml20Token");
-    public static final TokenType IssuedToken = new TokenType("IssuedToken");
-    public static final TokenType SecureConversationToken = new TokenType("SecureConversationToken");
-    public static final TokenType HttpsToken = new TokenType("HttpsToken");
-    public static final TokenType KerberosToken = new TokenType("KerberosToken");
-    public static final TokenType SpnegoContextToken = new TokenType("SpnegoContextToken");
-    public static final TokenType RelToken = new TokenType("RelToken");
+    public static final TokenType USERNAME_TOKEN = new TokenType("UsernameToken");
+    public static final TokenType SECURITY_CONTEXT_TOKEN = new TokenType("SecurityContextToken");
+    public static final TokenType SAML_10_TOKEN = new TokenType("Saml10Token");
+    public static final TokenType SAML_11_TOKEN = new TokenType("Saml11Token");
+    public static final TokenType SAML_20_TOKEN = new TokenType("Saml20Token");
+    public static final TokenType ISSUED_TOKEN = new TokenType("IssuedToken");
+    public static final TokenType SECURE_CONVERSATION_TOKEN = new TokenType("SecureConversationToken");
+    public static final TokenType HTTPS_TOKEN = new TokenType("HttpsToken");
+    public static final TokenType KERBEROS_TOKEN = new TokenType("KerberosToken");
+    public static final TokenType SPNEGO_CONTEXT_TOKEN = new TokenType("SpnegoContextToken");
+    public static final TokenType REL_TOKEN = new TokenType("RelToken");
 }

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=1724772&r1=1724771&r2=1724772&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 Fri Jan 15 10:48:29 2016
@@ -708,21 +708,21 @@ public final class ConfigurationConverte
         if ("IssuerSerial".equals(keyIdentifier)) {
            return WSSecurityTokenConstants.KeyIdentifier_IssuerSerial;
         } else if ("DirectReference".equals(keyIdentifier)) {
-            return WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference;
+            return WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE;
         } else if ("X509KeyIdentifier".equals(keyIdentifier)) {
             return WSSecurityTokenConstants.KeyIdentifier_X509KeyIdentifier;
         } else if ("Thumbprint".equals(keyIdentifier)) {
-            return WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier;
+            return WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER;
         } else if ("SKIKeyIdentifier".equals(keyIdentifier)) {
             return WSSecurityTokenConstants.KeyIdentifier_SkiKeyIdentifier;
         } else if ("EncryptedKeySHA1".equals(keyIdentifier)) {
-            return WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier;
+            return WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER;
         } else if ("EncryptedKey".equals(keyIdentifier)) {
             return WSSecurityTokenConstants.KeyIdentifier_EncryptedKey;
         } else if ("KeyValue".equals(keyIdentifier)) {
             return WSSecurityTokenConstants.KeyIdentifier_KeyValue;
         } else if ("KerberosSHA1".equals(keyIdentifier)) {
-            return WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier;
+            return WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER;
         }
         return null;
     }

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=1724772&r1=1724771&r2=1724772&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 Fri Jan 15 10:48:29 2016
@@ -683,7 +683,7 @@ public class OutboundWSSec {
                     @SuppressWarnings("unchecked")
                     TokenSecurityEvent<? extends SecurityToken> tokenSecurityEvent
                         = (TokenSecurityEvent<? extends SecurityToken>) securityEvent;
-                    TokenUsage mainSig = WSSecurityTokenConstants.TokenUsage_MainSignature;
+                    TokenUsage mainSig = WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE;
                     if (!tokenSecurityEvent.getSecurityToken().getTokenUsages().contains(mainSig)) {
                         continue;
                     }
@@ -706,7 +706,7 @@ public class OutboundWSSec {
                     @SuppressWarnings("unchecked")
                     TokenSecurityEvent<? extends SecurityToken> tokenSecurityEvent
                         = (TokenSecurityEvent<? extends SecurityToken>) securityEvent;
-                    TokenUsage mainSig = WSSecurityTokenConstants.TokenUsage_MainSignature;
+                    TokenUsage mainSig = WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE;
                     if (!tokenSecurityEvent.getSecurityToken().getTokenUsages().contains(mainSig)) {
                         continue;
                     }

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=1724772&r1=1724771&r2=1724772&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 Fri Jan 15 10:48:29 2016
@@ -267,7 +267,7 @@ public class WSSec {
                 if (securityProperties.getSignatureCanonicalizationAlgorithm() == null) {
                     securityProperties.setSignatureCanonicalizationAlgorithm(WSSConstants.NS_C14N_EXCL);
                 }
-                securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_UsernameTokenReference);
+                securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KEYIDENTIFIER_USERNAME_TOKEN_REFERENCE);
                 if (securityProperties.getUsernameTokenPasswordType() == null) {
                     securityProperties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST);
                 }
@@ -286,7 +286,7 @@ public class WSSec {
                     securityProperties.setSignatureCanonicalizationAlgorithm(WSSConstants.NS_C14N_EXCL);
                 }
                 if (securityProperties.getSignatureKeyIdentifier() == null) {
-                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
                 if (securityProperties.getEncryptionSymAlgorithm() == null) {
                     securityProperties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES256);
@@ -307,7 +307,7 @@ public class WSSec {
                     securityProperties.setDerivedKeyTokenReference(WSSConstants.DerivedKeyTokenReference.DirectReference);
                 }
                 if (securityProperties.getDerivedKeyTokenReference() != WSSConstants.DerivedKeyTokenReference.DirectReference) {
-                    securityProperties.setDerivedKeyKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    securityProperties.setDerivedKeyKeyIdentifier(WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
                 checkDefaultSecureParts(true, securityProperties);
             } else if (WSSConstants.ENCRYPT_WITH_DERIVED_KEY.equals(action)) {
@@ -347,7 +347,7 @@ public class WSSec {
                     securityProperties.setDerivedKeyTokenReference(WSSConstants.DerivedKeyTokenReference.EncryptedKey);
                 }
                 if (securityProperties.getDerivedKeyTokenReference() != WSSConstants.DerivedKeyTokenReference.DirectReference) {
-                    securityProperties.setDerivedKeyKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    securityProperties.setDerivedKeyKeyIdentifier(WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
                 checkDefaultSecureParts(false, securityProperties);
             } else if (WSSConstants.SAML_TOKEN_SIGNED.equals(action)) {
@@ -367,7 +367,7 @@ public class WSSec {
                     securityProperties.setSignatureCanonicalizationAlgorithm(WSSConstants.NS_C14N_EXCL);
                 }
                 if (securityProperties.getSignatureKeyIdentifier() == null) {
-                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
                 checkDefaultSecureParts(true, securityProperties);
             } else if (WSSConstants.SAML_TOKEN_UNSIGNED.equals(action) 
@@ -387,7 +387,7 @@ public class WSSec {
                     securityProperties.setSignatureCanonicalizationAlgorithm(WSSConstants.NS_C14N_EXCL);
                 }
                 if (securityProperties.getSignatureKeyIdentifier() == null) {
-                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
                 checkDefaultSecureParts(true, securityProperties);
             } else if (WSSConstants.ENCRYPT_WITH_KERBEROS_TOKEN.equals(action)) {
@@ -398,7 +398,7 @@ public class WSSec {
                     securityProperties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES256);
                 }
                 if (securityProperties.getSignatureKeyIdentifier() == null) {
-                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
                 checkDefaultSecureParts(false, securityProperties);
             }