Author: alessio.soldano(a)jboss.com
Date: 2012-01-30 11:23:50 -0500 (Mon, 30 Jan 2012)
New Revision: 15542
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java
Log:
[JBWS-3386] UsernameToken password is not mandatory
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java 2012-01-30
16:08:08 UTC (rev 15541)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/element/UsernameToken.java 2012-01-30
16:23:50 UTC (rev 15542)
@@ -27,6 +27,7 @@
import javax.xml.namespace.QName;
import org.apache.xml.security.utils.XMLUtils;
+import org.jboss.logging.Logger;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.extensions.security.Constants;
@@ -82,8 +83,10 @@
this.username = XMLUtils.getFullTextChildrenFromElement(child);
child = Util.getNextSiblingElement(child);
- if (child == null || ! Constants.WSSE_NS.equals(child.getNamespaceURI()) || !
"Password".equals(child.getLocalName()))
- throw new WSSecurityException(BundleUtils.getMessage(bundle,
"PASSWORD_CHILD_EXPECTED"));
+ if (child == null || ! Constants.WSSE_NS.equals(child.getNamespaceURI()) || !
"Password".equals(child.getLocalName())) {
+ Logger.getLogger(this.getClass()).debug(BundleUtils.getMessage(bundle,
"PASSWORD_CHILD_EXPECTED"));
+ return;
+ }
this.password = XMLUtils.getFullTextChildrenFromElement(child);
String passwordType = child.getAttribute("Type");
Show replies by date