You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/03/13 12:07:49 UTC
[08/10] cxf git commit: Minor fix
Minor fix
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e548a02f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e548a02f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e548a02f
Branch: refs/heads/master
Commit: e548a02fa04313fd1b6ec5d9ac78c774e8ad935a
Parents: 24e330c
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Mar 11 11:00:07 2015 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Mar 11 11:00:07 2015 +0000
----------------------------------------------------------------------
.../cxf/ws/security/wss4j/WSS4JOutInterceptor.java | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/e548a02f/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
index ea4fddd..8e1bb5b 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
@@ -228,11 +228,7 @@ public class WSS4JOutInterceptor extends AbstractWSS4JInterceptor {
}
}
- /*
- * Now we perform some set-up for UsernameToken and Signature
- * functions. No need to do it for encryption only. Check if
- * username is available and then get a passowrd.
- */
+ // Check to see if we require a username (+ if it's missing)
boolean userNameRequired = false;
for (HandlerAction handlerAction : actions) {
if ((handlerAction.getAction() == WSConstants.SIGN
@@ -246,13 +242,10 @@ public class WSS4JOutInterceptor extends AbstractWSS4JInterceptor {
}
if (userNameRequired && (reqData.getUsername() == null || reqData.getUsername().equals(""))
&& (String)getOption(WSHandlerConstants.SIGNATURE_USER) == null) {
- /*
- * We need a username - if none throw an SoapFault. For
- * encryption there is a specific parameter to get a username.
- */
throw new SoapFault(new Message("NO_USERNAME", LOG), version
.getReceiver());
}
+
if (doDebug) {
LOG.fine("Actor: " + reqData.getActor());
}