0 Replies Latest reply on Aug 9, 2004 12:42 AM by tomansley

    javax.security.auth.login.FailedLoginException: Password Inc

    tomansley

      I have an interesting problem. I am trying to get JAAS working on my JBoss 4.0 system working. I have everything set up using the org.jboss.security.auth.spi.DatabaseServerLoginModule that is available to use in the JBoss framework. I have everything hooked in but it is giving the error message in the heading.

      What is so interesting about it is that the password seems to change whilst inside the callbackHandler. Here is my callBackHandler and here is the bit of debugging that comes with it.

      If any more information is needed please shout at me.

      Any help appreciated.

      ##################################################
      This is the callback handler
      ##################################################
      public class PassiveCallbackHandler implements CallbackHandler {

      private String username;
      private char[] password;

      public PassiveCallbackHandler(String user, String pass) {
      this.username = user;
      System.out.println("Password1 = "+pass);
      for (int i = 0; i < pass.length(); i++) {

      System.out.println("char at "+i+" = "+pass.charAt(i));

      }
      this.password = pass.toCharArray();
      System.out.println("Password2 = "+password);

      }

      #################################################################
      This is the weird debugging that shows the password changing half way through
      #################################################################

      .......
      ........
      22:10:58,631 INFO [STDOUT] Password1 = pass
      22:10:58,632 INFO [STDOUT] char at 0 = p
      22:10:58,632 INFO [STDOUT] char at 1 = a
      22:10:58,632 INFO [STDOUT] char at 2 = s
      22:10:58,632 INFO [STDOUT] char at 3 = s
      22:10:58,632 INFO [STDOUT] Password2 = [C@1a95c64
      22:10:58,659 INFO [STDOUT] javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
      .........

      What is up with Password2 changing to goobledeegook?

      Cheers

      Tom