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 2013/10/22 18:14:57 UTC

svn commit: r1534692 - in /webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken: ExternalSecurityTokenImpl.java SecurityTokenFactoryImpl.java

Author: coheigea
Date: Tue Oct 22 16:14:57 2013
New Revision: 1534692

URL: http://svn.apache.org/r1534692
Log:
Fixing policy error

Modified:
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java?rev=1534692&r1=1534691&r2=1534692&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/ExternalSecurityTokenImpl.java Tue Oct 22 16:14:57 2013
@@ -44,8 +44,9 @@ public class ExternalSecurityTokenImpl e
     
     public ExternalSecurityTokenImpl(WSInboundSecurityContext wsInboundSecurityContext, String id,
                                  WSSecurityTokenConstants.KeyIdentifier keyIdentifier,
-                                 WSSSecurityProperties securityProperties) throws WSSecurityException {
-        super(wsInboundSecurityContext, id, keyIdentifier, false);
+                                 WSSSecurityProperties securityProperties,
+                                 boolean included) throws WSSecurityException {
+        super(wsInboundSecurityContext, id, keyIdentifier, included);
         if (securityProperties.getCallbackHandler() != null) {
             // Try to get the token from a CallbackHandler
             WSPasswordCallback pwcb = 

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java?rev=1534692&r1=1534691&r2=1534692&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/securityToken/SecurityTokenFactoryImpl.java Tue Oct 22 16:14:57 2013
@@ -306,13 +306,15 @@ public class SecurityTokenFactoryImpl ex
                     ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R3062);
                     throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY, "badReferenceURI");
                 }
+                boolean included = true;
                 if (!uri.startsWith("#")) {
+                    included = false;
                     // Delegate to a CallbackHandler, in case the token is not in the request
                     try {
                         return new ExternalSecurityTokenImpl((WSInboundSecurityContext) inboundSecurityContext, 
                                                      uri,
                                                      WSSecurityTokenConstants.KeyIdentifier_ExternalReference, 
-                                                     securityProperties);
+                                                     securityProperties, false);
                     } catch (WSSecurityException ex) { //NOPMD
                         // just continue
                     }
@@ -341,8 +343,7 @@ public class SecurityTokenFactoryImpl ex
                     return new ExternalSecurityTokenImpl((WSInboundSecurityContext) inboundSecurityContext, 
                                                      uri,
                                                      WSSecurityTokenConstants.KeyIdentifier_ExternalReference, 
-                                                     securityProperties);
-                    // throw new WSSecurityException(WSSecurityException.ErrorCode.SECURITY_TOKEN_UNAVAILABLE, "noToken", uri);
+                                                     securityProperties, included);
                 }
                 if (securityTokenProvider.getSecurityToken() instanceof SecurityTokenReference) {
                     ((WSInboundSecurityContext) inboundSecurityContext).handleBSPRule(BSPRule.R3057);