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 ]
        Hide
        jaminh jaminh added a comment -

        Here is a patch for the new constructor

        Show
        jaminh jaminh added a comment - Here is a patch for the new constructor
        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 logged work - 24/Jan/12 7:26 AM
        • Time Spent:
          0.05h
           
          <No comment>
        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 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        20d 1h 43m 1 Arjen Poutsma 24/Jan/12 7:23 AM
        In Progress In Progress Resolved Resolved
        3m 20s 1 Arjen Poutsma 24/Jan/12 7:26 AM
        Resolved Resolved Closed Closed
        100d 23h 36m 1 Arjen Poutsma 04/May/12 7:03 AM

          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