[SWS-745] Convenience constructor for SimpleUsernamePasswordCallbackHandler Created: 04/Jan/12  Updated: 04/May/12  Resolved: 24/Jan/12

Status: Closed
Project: Spring Web Services
Component/s: Security
Affects Version/s: 2.0.3
Fix Version/s: 2.0.4

Type: Improvement Priority: Trivial
Reporter: Eirik Lygre Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 0.05h
Original Estimate: Not Specified

Attachments: Text File spring-ws-security.patch    


The class org.springframework.ws.soap.security.xwss.callback.SimpleUsernamePasswordCallbackHandler has two properties "username" and "password", and only a default constuctor. When using this class, I always find myself writing this code:

SimpleUsernamePasswordCallbackHandler callback = new SimpleUsernamePasswordCallbackHandler ();

Of course, I'd love to write this instead, which would be a, hm, productivity booster?

doSomething(new SimpleUsernamePasswordCallbackHandler (username, password));

Hence, the request: Add the required constructors to make this work:

public class SimpleUsernamePasswordCallbackHandler extends AbstractCallbackHandler implements InitializingBean {
   public SimpleUsernamePasswordCallbackHandler ();
   public SimpleUsernamePasswordCallbackHandler (String username, String password);

Comment by jaminh [ 20/Jan/12 ]

Here is a patch for the new constructor

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Thu Oct 18 13:34:01 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.