org.sakaiproject.portal.authn
Class AuthnPortal

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.sakaiproject.portal.authn.AuthnPortal
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class AuthnPortal
extends HttpServlet

AuthnPortal is a public login/logout only Sakai portal - it provides a simple URL to login or logout and go somewhere if successful.

Version:
$Revision: 5918 $
Author:
University of Michigan, Sakai Software Development Team
See Also:
Serialized Form

Field Summary
protected static String ATTR_ERROR
          ThreadLocal attribute set while we are processing an error.
protected static String ATTR_SITE_PAGE
          Session attribute root for storing a site's last page visited - just append the site id.
protected static int ERROR_GALLERY
           
protected static int ERROR_SITE
          Error response modes.
protected static int ERROR_WORKSITE
           
 
Constructor Summary
AuthnPortal()
           
 
Method Summary
 void destroy()
          Shutdown the servlet.
protected  void doError(HttpServletRequest req, HttpServletResponse res, Session session, int mode)
           
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
          Respond to navigation / access requests.
protected  void doLogin(HttpServletRequest req, HttpServletResponse res, Session session, String returnPath)
           
protected  void doLogout(HttpServletRequest req, HttpServletResponse res, Session session, String returnPath)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
          Respond to data posting requests.
protected  void endResponse(PrintWriter out)
           
protected  void forwardTool(ActiveTool tool, HttpServletRequest req, HttpServletResponse res, Placement p, String skin, String toolContextPath, String toolPathInfo)
          Forward to the tool - but first setup JavaScript/CSS etc that the tool will render
protected  String getScriptPath()
           
 String getServletInfo()
          Access the Servlet's information display.
 void init(ServletConfig config)
          Initialize the servlet.
protected  PrintWriter startResponse(HttpServletResponse res, String title, String skin)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_SITE_PAGE

protected static final String ATTR_SITE_PAGE
Session attribute root for storing a site's last page visited - just append the site id.

See Also:
Constant Field Values

ATTR_ERROR

protected static final String ATTR_ERROR
ThreadLocal attribute set while we are processing an error.

See Also:
Constant Field Values

ERROR_SITE

protected static final int ERROR_SITE
Error response modes.

See Also:
Constant Field Values

ERROR_GALLERY

protected static final int ERROR_GALLERY
See Also:
Constant Field Values

ERROR_WORKSITE

protected static final int ERROR_WORKSITE
See Also:
Constant Field Values
Constructor Detail

AuthnPortal

public AuthnPortal()
Method Detail

destroy

public void destroy()
Shutdown the servlet.


doError

protected void doError(HttpServletRequest req,
                       HttpServletResponse res,
                       Session session,
                       int mode)
                throws IOException
Throws:
IOException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     IOException
Respond to navigation / access requests.

Parameters:
req - The servlet request.
res - The servlet response.
Throws:
ServletException.
IOException.
ServletException
IOException

doLogin

protected void doLogin(HttpServletRequest req,
                       HttpServletResponse res,
                       Session session,
                       String returnPath)
                throws ToolException
Throws:
ToolException

doLogout

protected void doLogout(HttpServletRequest req,
                        HttpServletResponse res,
                        Session session,
                        String returnPath)
                 throws ToolException
Throws:
ToolException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      IOException
Respond to data posting requests.

Parameters:
req - The servlet request.
res - The servlet response.
Throws:
ServletException.
IOException.
ServletException
IOException

forwardTool

protected void forwardTool(ActiveTool tool,
                           HttpServletRequest req,
                           HttpServletResponse res,
                           Placement p,
                           String skin,
                           String toolContextPath,
                           String toolPathInfo)
                    throws ToolException
Forward to the tool - but first setup JavaScript/CSS etc that the tool will render

Throws:
ToolException

endResponse

protected void endResponse(PrintWriter out)
                    throws IOException
Throws:
IOException

getServletInfo

public String getServletInfo()
Access the Servlet's information display.

Returns:
servlet information.

init

public void init(ServletConfig config)
          throws ServletException
Initialize the servlet.

Parameters:
config - The servlet config.
Throws:
ServletException

startResponse

protected PrintWriter startResponse(HttpServletResponse res,
                                    String title,
                                    String skin)
                             throws IOException
Throws:
IOException

getScriptPath

protected String getScriptPath()