Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenience constructor for SimpleUsernamePasswordCallbackHandler [SWS-745] #834

Closed
gregturn opened this issue Jan 4, 2012 · 2 comments
Closed
Assignees
Milestone

Comments

@gregturn
Copy link
Contributor

gregturn commented Jan 4, 2012

Eirik Lygre opened SWS-745 and commented

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 ();
callback.setUsername(username);
callback.setPassword(password);
doSomething(callback);

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);
   ...
}

Affects: 2.0.3

Attachments:

Referenced from: commits 0f277d4

@gregturn
Copy link
Contributor Author

jaminh commented

Here is a patch for the new constructor

@gregturn
Copy link
Contributor Author

gregturn commented May 4, 2012

Arjen Poutsma commented

Closing old issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants