1 Reply Latest reply on Mar 9, 2011 3:06 AM by v2adam

    DIGEST authentication jboss 4.2 problem

    dcabrera22

      Hello, I have a problem with the change from BASIC to DIGEST.

       

      I used the next link to start http://docs.jboss.org/jbossas/guides/webguide/r2/en/html/ch05.html

      I have a class which extend AbstractServerLoginModule.

      In the function "login()", I used to receive de username and password without problem (using BASIC). Now, using DIGEST, the password always change. I don't understand why. I think that the idea is that I have to receive the same hash all the time, but no.

       

      Anyone have an idea?

       

      Thanks

      Diego Cabrera

        • 1. Re: DIGEST authentication jboss 4.2 problem
          v2adam

          Hello all

           

          I have same problem, i try used this on jboss.6.0.0.Final, i output password and password always change, i try hash same password manually,

          used this code:

           

             final MessageDigest messageDigest = MessageDigest.getInstance("MD5");
             messageDigest.reset();
             //username:realm:password
             messageDigest.update(("aaa" + ":" + "UserAuth" + ":" + "123").getBytes(Charset.forName("UTF8")));
             final byte[] resultByte = messageDigest.digest();  
             final String result = new String(Hex.encodeHex(resultByte));   
          


          and password not change, what is the problem, i not understand, please help