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

        elygre Eirik Lygre created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Assignee Arjen Poutsma [ arjen.poutsma ]
        Fix Version/s 2.0.4 [ 12628 ]
        jaminh jaminh made changes -
        Attachment spring-ws-security.patch [ 19324 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma made changes -
        Worklog Id 28553 [ 28553 ]
        Time Spent 0.05h [ 180 ]
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          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