[jboss-cvs] jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace ...

Gavin King gavin.king at jboss.com
Sun Feb 4 04:50:32 EST 2007


  User: gavin   
  Date: 07/02/04 04:50:32

  Modified:    examples/seamspace/src/org/jboss/seam/example/seamspace 
                        Authenticator.java
  Log:
  minor
  
  Revision  Changes    Path
  1.13      +10 -7     jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/Authenticator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Authenticator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/Authenticator.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- Authenticator.java	4 Feb 2007 09:37:57 -0000	1.12
  +++ Authenticator.java	4 Feb 2007 09:50:32 -0000	1.13
  @@ -36,15 +36,15 @@
               .setParameter("username", identity.getUsername())
               .getSingleResult();
            
  -         if (!compareHash(member.getHashedPassword(), identity.getPassword())) {
  +         if ( !compareHash( member.getHashedPassword(), identity.getPassword() ) ) 
  +         {
                return false;
            }
            
            authenticatedMember = member;
            
  -         if (authenticatedMember.getRoles() != null)
  +         for ( MemberRole mr : member.getRoles() )
            {
  -            for (MemberRole mr : authenticatedMember.getRoles())
                  identity.addRole(mr.getName());
            }
            
  @@ -56,13 +56,16 @@
         }      
      }
      
  -   private boolean compareHash(String hash, String password) {
  -       if (hash == null || password == null) {
  +   private boolean compareHash(String hash, String password) 
  +   {
  +       if (hash == null || password == null) 
  +       {
              return false;
          }
          
          String newHash = Hash.instance().hash(password);
  -       if (newHash == null) {
  +       if (newHash == null) 
  +       {
              return false;
          }
   
  
  
  



More information about the jboss-cvs-commits mailing list