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

Shane Bryzak Shane_Bryzak at symantec.com
Tue Jul 25 02:50:19 EDT 2006


  User: sbryzak2
  Date: 06/07/25 02:50:19

  Modified:    src/main/org/jboss/seam/security/authenticator    
                        Authenticator.java BaseAuthenticator.java
                        BasicAuthenticator.java FormAuthenticator.java
  Log:
  Some more security stuff... still work in progress
  
  Revision  Changes    Path
  1.2       +8 -0      jboss-seam/src/main/org/jboss/seam/security/authenticator/Authenticator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Authenticator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/authenticator/Authenticator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- Authenticator.java	24 Jul 2006 07:13:39 -0000	1.1
  +++ Authenticator.java	25 Jul 2006 06:50:19 -0000	1.2
  @@ -1,5 +1,9 @@
   package org.jboss.seam.security.authenticator;
   
  +import java.io.IOException;
  +import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpServletResponse;
  +
   import org.jboss.seam.security.config.SecurityConfig;
   
   /**
  @@ -10,4 +14,8 @@
   public interface Authenticator
   {
     void setSecurityConfig(SecurityConfig securityConfig);
  +  boolean processLogin(HttpServletRequest request, HttpServletResponse response);
  +
  +  void showLogin(HttpServletRequest request, HttpServletResponse response)
  +      throws IOException;
   }
  
  
  
  1.2       +8 -0      jboss-seam/src/main/org/jboss/seam/security/authenticator/BaseAuthenticator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BaseAuthenticator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/authenticator/BaseAuthenticator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- BaseAuthenticator.java	24 Jul 2006 07:13:39 -0000	1.1
  +++ BaseAuthenticator.java	25 Jul 2006 06:50:19 -0000	1.2
  @@ -1,5 +1,8 @@
   package org.jboss.seam.security.authenticator;
   
  +import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpServletResponse;
  +
   import org.jboss.seam.security.config.SecurityConfig;
   
   /**
  @@ -15,4 +18,9 @@
     {
       this.securityConfig = securityConfig;
     }
  +
  +  public boolean processLogin(HttpServletRequest request, HttpServletResponse response)
  +  {
  +    return false;
  +  }
   }
  
  
  
  1.2       +10 -0     jboss-seam/src/main/org/jboss/seam/security/authenticator/BasicAuthenticator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BasicAuthenticator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/authenticator/BasicAuthenticator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- BasicAuthenticator.java	24 Jul 2006 07:13:39 -0000	1.1
  +++ BasicAuthenticator.java	25 Jul 2006 06:50:19 -0000	1.2
  @@ -1,5 +1,9 @@
   package org.jboss.seam.security.authenticator;
   
  +import javax.servlet.http.HttpServletRequest;
  +import java.io.IOException;
  +import javax.servlet.http.HttpServletResponse;
  +
   /**
    * Implementation of Basic HTTP authentication
    *
  @@ -10,4 +14,10 @@
     public BasicAuthenticator()
     {
     }
  +
  +  public void showLogin(HttpServletRequest request, HttpServletResponse response)
  +      throws IOException
  +  {
  +
  +  }
   }
  
  
  
  1.2       +14 -0     jboss-seam/src/main/org/jboss/seam/security/authenticator/FormAuthenticator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FormAuthenticator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/authenticator/FormAuthenticator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- FormAuthenticator.java	24 Jul 2006 07:13:39 -0000	1.1
  +++ FormAuthenticator.java	25 Jul 2006 06:50:19 -0000	1.2
  @@ -1,5 +1,9 @@
   package org.jboss.seam.security.authenticator;
   
  +import javax.servlet.http.HttpServletRequest;
  +import java.io.IOException;
  +import javax.servlet.http.HttpServletResponse;
  +
   /**
    * Implementation of form-based authentication
    *
  @@ -7,7 +11,17 @@
    */
   public class FormAuthenticator extends BaseAuthenticator
   {
  +  private String loginPage;
  +
     public FormAuthenticator(String loginPage, String errorPage, String defaultPage)
     {
     }
  +
  +  public void showLogin(HttpServletRequest request, HttpServletResponse response)
  +      throws IOException
  +  {
  +    // Redirect the request to the login page
  +    response.sendRedirect(response.encodeRedirectURL(request.getContextPath() +
  +        loginPage));
  +  }
   }
  
  
  



More information about the jboss-cvs-commits mailing list