Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-745

Convenience constructor for SimpleUsernamePasswordCallbackHandler

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4
    • Component/s: Security
    • Labels:
      None

      Description

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

        Activity

        arjen.poutsma Arjen Poutsma logged work - 24/Jan/12 7:26 AM
        • Time Spent:
          0.05h
           
          <No comment>

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            elygre Eirik Lygre
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - Not Specified
              Not Specified
              Logged:
              Time Spent - 0.05h
              0.05h