axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/handlers SimpleAuthenticationHandler.java SimpleAuthorizationHandler.java
Date Wed, 07 Feb 2001 15:04:39 GMT
dug         01/02/07 07:04:38

  Modified:    java/src/org/apache/axis/handlers
                        SimpleAuthenticationHandler.java
                        SimpleAuthorizationHandler.java
  Log:
  Allow everyone in if the *lst files aren't there - to make things
  easier.
  
  Revision  Changes    Path
  1.2       +8 -4      xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java
  
  Index: SimpleAuthenticationHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleAuthenticationHandler.java	2001/02/06 19:51:43	1.1
  +++ SimpleAuthenticationHandler.java	2001/02/07 15:04:38	1.2
  @@ -89,15 +89,17 @@
         String  passwd = (String) msgContext.getProperty( Constants.MC_PASSWORD );
         Debug.Print( 1, "User: " + userID );
         Debug.Print( 2, "Pass: " + passwd );
  -      if ( userID == null || userID.equals("") )
  -        throw new AxisFault( "Server.Unauthorized", 
  -                             "User not authorized",
  -                             null, null );
   
         FileReader        fr   = new FileReader( "users.lst" );
         LineNumberReader  lnr  = new LineNumberReader( fr );
         String            line = null ;
         boolean           done = false ;
  +
  +      if ( userID == null || userID.equals("") )
  +        throw new AxisFault( "Server.Unauthorized", 
  +                             "User not authorized",
  +                             null, null );
  +
         while ( (line = lnr.readLine()) != null ) {
           StringTokenizer  st = new StringTokenizer( line );
           String           u  = null ,
  @@ -124,6 +126,8 @@
       }
       catch( Exception e ) {
         Debug.Print( 1, e );
  +      // If no file - just allow everyone!
  +      if ( e instanceof FileNotFoundException ) return ;
         if ( !(e instanceof AxisFault) ) e = new AxisFault(e);
         throw (AxisFault) e ;
       }
  
  
  
  1.3       +7 -4      xml-axis/java/src/org/apache/axis/handlers/SimpleAuthorizationHandler.java
  
  Index: SimpleAuthorizationHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/SimpleAuthorizationHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleAuthorizationHandler.java	2001/02/07 13:52:05	1.2
  +++ SimpleAuthorizationHandler.java	2001/02/07 15:04:38	1.3
  @@ -92,15 +92,16 @@
         Debug.Print( 1, "User: " + userID );
         Debug.Print( 1, "Action: " + action );
   
  +      FileReader        fr   = new FileReader( "perms.lst" );
  +      LineNumberReader  lnr  = new LineNumberReader( fr );
  +      String            line = null ;
  +      boolean           done = false ;
  +
         if ( userID == null || userID.equals("") )
           throw new AxisFault( "Server.Unauthorized", 
                                "User not authorized",
                                null, null );
   
  -      FileReader        fr   = new FileReader( "perms.lst" );
  -      LineNumberReader  lnr  = new LineNumberReader( fr );
  -      String            line = null ;
  -      boolean           done = false ;
         while ( (line = lnr.readLine()) != null ) {
           StringTokenizer  st = new StringTokenizer( line );
           String           u  = null ,
  @@ -126,6 +127,8 @@
       }
       catch( Exception e ) {
         Debug.Print( 1, e );
  +      // If no file - just allow everyone!
  +      if ( e instanceof FileNotFoundException ) return ;
         if ( !(e instanceof AxisFault) ) e = new AxisFault(e);
         throw (AxisFault) e ;
       }
  
  
  

Mime
View raw message