Author: alessio.soldano(a)jboss.com
Date: 2011-05-09 10:27:24 -0400 (Mon, 09 May 2011)
New Revision: 14329
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/ServerUsernamePasswordCallback.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/ServerUsernamePasswordCallback.java
Log:
[JBWS-3272] Update callbackhandlers
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/ServerUsernamePasswordCallback.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/ServerUsernamePasswordCallback.java 2011-05-09
13:43:04 UTC (rev 14328)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/ServerUsernamePasswordCallback.java 2011-05-09
14:27:24 UTC (rev 14329)
@@ -33,7 +33,9 @@
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException
{
WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
- if (!("kermit".equals(pc.getIdentifier()) &&
"thefrog".equals(pc.getPassword())))
- throw new SecurityException("User '" + pc.getIdentifier() +
"' with password '" + pc.getPassword() + "' not
allowed.");
+ if ("kermit".equals(pc.getIdentifier()))
+ pc.setPassword("thefrog");
+ else
+ pc.setPassword("wrong password");
}
}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java 2011-05-09
13:43:04 UTC (rev 14328)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wssePolicy/UsernamePasswordCallback.java 2011-05-09
14:27:24 UTC (rev 14329)
@@ -33,9 +33,8 @@
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException
{
WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
+ //this CallbackHandler is meant for use with WSS4J 1.6, see
http://ws.apache.org/wss4j/wss4j16.html
if ("kermit".equals(pc.getIdentifier()))
pc.setPassword("thefrog");
- else
- pc.setPassword("wrong password");
}
}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/ServerUsernamePasswordCallback.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/ServerUsernamePasswordCallback.java 2011-05-09
13:43:04 UTC (rev 14328)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/ServerUsernamePasswordCallback.java 2011-05-09
14:27:24 UTC (rev 14329)
@@ -33,7 +33,8 @@
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException
{
WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
- if (!("kermit".equals(pc.getIdentifier()) &&
"thefrog".equals(pc.getPassword())))
- throw new SecurityException("User '" + pc.getIdentifier() +
"' with password '" + pc.getPassword() + "' not
allowed.");
+ //this CallbackHandler is meant for use with WSS4J 1.6, see
http://ws.apache.org/wss4j/wss4j16.html
+ if ("kermit".equals(pc.getIdentifier()))
+ pc.setPassword("thefrog");
}
}