[jboss-cvs] jboss-seam/src/main/org/jboss/seam/security/digest ...

Shane Bryzak sbryzak at redhat.com
Wed May 23 04:24:49 EDT 2007


  User: sbryzak2
  Date: 07/05/23 04:24:49

  Modified:    src/main/org/jboss/seam/security/digest 
                        DigestAuthenticator.java
  Log:
  more digest stuff
  
  Revision  Changes    Path
  1.2       +3 -10     jboss-seam/src/main/org/jboss/seam/security/digest/DigestAuthenticator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DigestAuthenticator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/digest/DigestAuthenticator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- DigestAuthenticator.java	23 May 2007 03:44:32 -0000	1.1
  +++ DigestAuthenticator.java	23 May 2007 08:24:49 -0000	1.2
  @@ -1,7 +1,5 @@
   package org.jboss.seam.security.digest;
   
  -import javax.security.auth.login.LoginException;
  -
   import org.jboss.seam.contexts.Context;
   import org.jboss.seam.contexts.Contexts;
   import org.jboss.seam.security.Identity;
  @@ -14,15 +12,14 @@
    */
   public abstract class DigestAuthenticator
   {
  -   protected void checkPassword(String password)
  -      throws LoginException
  +   protected boolean validatePassword(String password)
      {
         Context ctx = Contexts.getSessionContext();
         
         DigestRequest digestRequest = (DigestRequest) ctx.get(DigestRequest.DIGEST_REQUEST);
         if (digestRequest == null)
         {
  -         throw new LoginException("No digest request found in session scope");
  +         throw new IllegalStateException("No digest request found in session scope");
         }
         
         // Remove the digest request from the session now
  @@ -37,10 +34,6 @@
                  digestRequest.getNonce(), digestRequest.getNonceCount(), 
                  digestRequest.getClientNonce());
   
  -      // If digest is incorrect, try refreshing from backend and recomputing
  -      if (!serverDigestMd5.equals(digestRequest.getClientDigest()))
  -      {
  -         throw new LoginException("Digest authentication failed - incorrect response");
  -      }
  +      return serverDigestMd5.equals(digestRequest.getClientDigest());
      }  
   }
  
  
  



More information about the jboss-cvs-commits mailing list