User: starksm 
  Date: 01/11/27 22:10:45

  Modified:    src/main/org/jboss/security/auth/spi Tag: Branch_2_4
                        DatabaseServerLoginModule.java
                        UsernamePasswordLoginModule.java
  Log:
  Complete switch to org.jboss.logging.Logger
  Add support for package version manifest headers
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.4.3   +11 -3     
jbosssx/src/main/org/jboss/security/auth/spi/DatabaseServerLoginModule.java
  
  Index: DatabaseServerLoginModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/DatabaseServerLoginModule.java,v
  retrieving revision 1.2.4.2
  retrieving revision 1.2.4.3
  diff -u -r1.2.4.2 -r1.2.4.3
  --- DatabaseServerLoginModule.java    2001/10/19 23:50:08     1.2.4.2
  +++ DatabaseServerLoginModule.java    2001/11/28 06:10:45     1.2.4.3
  @@ -43,7 +43,7 @@
    
    @author <a href="[EMAIL PROTECTED]">Oleg Nitz</a>
    @author [EMAIL PROTECTED]
  - @version $Revision: 1.2.4.2 $
  + @version $Revision: 1.2.4.3 $
    */
   public class DatabaseServerLoginModule extends UsernamePasswordLoginModule
   {
  @@ -157,8 +157,16 @@
            ps.setString(1, username);
            ResultSet rs = ps.executeQuery();
            if( rs.next() == false )
  -            throw new FailedLoginException("No matching username found in Roles");
  -         
  +         {
  +            if( getUnauthenticatedIdentity() == null )
  +               throw new FailedLoginException("No matching username found in 
Roles");
  +            /* We are running with an unauthenticatedIdentity so create an
  +               empty Roles set and return.
  +            */
  +            Group[] roleSets = { new SimpleGroup("Roles") };
  +            return roleSets;
  +         }
  +
            do
            {
               String name = rs.getString(1);
  
  
  
  1.3.4.4   +8 -1      
jbosssx/src/main/org/jboss/security/auth/spi/UsernamePasswordLoginModule.java
  
  Index: UsernamePasswordLoginModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/UsernamePasswordLoginModule.java,v
  retrieving revision 1.3.4.3
  retrieving revision 1.3.4.4
  diff -u -r1.3.4.3 -r1.3.4.4
  --- UsernamePasswordLoginModule.java  2001/10/19 23:50:08     1.3.4.3
  +++ UsernamePasswordLoginModule.java  2001/11/28 06:10:45     1.3.4.4
  @@ -38,7 +38,7 @@
    @see #getUsersRoles()
    
    @author [EMAIL PROTECTED]
  - @version $Revision: 1.3.4.3 $
  + @version $Revision: 1.3.4.4 $
    */
   public abstract class UsernamePasswordLoginModule extends AbstractServerLoginModule
   {
  @@ -61,7 +61,10 @@
         // Check for unauthenticatedIdentity option.
         String name = (String) options.get("unauthenticatedIdentity");
         if( name != null )
  +      {
            unauthenticatedIdentity = new SimplePrincipal(name);
  +         super.log.trace("Saw unauthenticatedIdentity="+name);
  +      }
      }
   
      /**
  @@ -95,7 +98,11 @@
         String username = info[0];
         String password = info[1];
         if( username == null && password == null )
  +      {
            identity = unauthenticatedIdentity;
  +         super.log.trace("Authenticating as unauthenticatedIdentity="+identity);
  +      }
  +
         if( identity == null )
         {
            identity = new SimplePrincipal(username);
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to