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

Shane Bryzak Shane_Bryzak at symantec.com
Sun Jul 30 20:50:56 EDT 2006


  User: sbryzak2
  Date: 06/07/30 20:50:56

  Added:       src/main/org/jboss/seam/security/authenticator    
                        BaseHandler.java BasicHandler.java FormHandler.java
                        Handler.java
  Log:
  Redesign
  
  Revision  Changes    Path
  1.1      date: 2006/07/31 00:50:55;  author: sbryzak2;  state: Exp;jboss-seam/src/main/org/jboss/seam/security/authenticator/BaseHandler.java
  
  Index: BaseHandler.java
  ===================================================================
  package org.jboss.seam.security.filter.handler;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import org.jboss.seam.security.config.SecurityConfig;
  
  
  
  /**
   * Abstract base class for Authenticator implementations.
   *
   * @author Shane Bryzak
   */
  public abstract class BaseHandler implements Handler
  {
    protected SecurityConfig securityConfig;
  
    public void setSecurityConfig(SecurityConfig securityConfig)
    {
      this.securityConfig = securityConfig;
    }
  
    public boolean processLogin(HttpServletRequest request, HttpServletResponse response)
    {
      return false;
    }
  }
  
  
  
  1.1      date: 2006/07/31 00:50:55;  author: sbryzak2;  state: Exp;jboss-seam/src/main/org/jboss/seam/security/authenticator/BasicHandler.java
  
  Index: BasicHandler.java
  ===================================================================
  package org.jboss.seam.security.filter.handler;
  
  import javax.servlet.http.HttpServletRequest;
  import java.io.IOException;
  import javax.servlet.http.HttpServletResponse;
  
  /**
   * Implementation of Basic HTTP authentication
   *
   * @author Shane Bryzak
   */
  public class BasicHandler extends BaseHandler
  {
    public BasicHandler()
    {
    }
  
    public void showLogin(HttpServletRequest request, HttpServletResponse response)
        throws IOException
    {
  
    }
  }
  
  
  
  1.1      date: 2006/07/31 00:50:55;  author: sbryzak2;  state: Exp;jboss-seam/src/main/org/jboss/seam/security/authenticator/FormHandler.java
  
  Index: FormHandler.java
  ===================================================================
  package org.jboss.seam.security.filter.handler;
  
  import javax.servlet.http.HttpServletRequest;
  import java.io.IOException;
  import javax.servlet.http.HttpServletResponse;
  
  /**
   * Implementation of form-based authentication
   *
   * @author Shane Bryzak
   */
  public class FormHandler extends BaseHandler
  {
    private String loginPage;
  
    public FormHandler(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));
    }
  }
  
  
  
  1.1      date: 2006/07/31 00:50:55;  author: sbryzak2;  state: Exp;jboss-seam/src/main/org/jboss/seam/security/authenticator/Handler.java
  
  Index: Handler.java
  ===================================================================
  package org.jboss.seam.security.filter.handler;
  
  import java.io.IOException;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import org.jboss.seam.security.config.SecurityConfig;
  
  /**
   * The authenticator interface
   *
   * @author Shane Bryzak
   */
  public interface Handler
  {
    void setSecurityConfig(SecurityConfig securityConfig);
    boolean processLogin(HttpServletRequest request, HttpServletResponse response);
  
    void showLogin(HttpServletRequest request, HttpServletResponse response)
        throws IOException;
  }
  
  
  



More information about the jboss-cvs-commits mailing list