001: /*
002: * Copyright (c) 2001 - 2004 ivata limited.
003: * All rights reserved.
004: * -----------------------------------------------------------------------------
005: * ivata masks may be redistributed under the GNU General Public
006: * License as published by the Free Software Foundation;
007: * version 2 of the License.
008: *
009: * These programs are free software; you can redistribute them and/or
010: * modify them under the terms of the GNU General Public License
011: * as published by the Free Software Foundation; version 2 of the License.
012: *
013: * These programs are distributed in the hope that they will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: *
017: * See the GNU General Public License in the file LICENSE.txt for more
018: * details.
019: *
020: * If you would like a copy of the GNU General Public License write to
021: *
022: * Free Software Foundation, Inc.
023: * 59 Temple Place - Suite 330
024: * Boston, MA 02111-1307, USA.
025: *
026: *
027: * To arrange commercial support and licensing, contact ivata at
028: * http://www.ivata.com/contact.jsp
029: * -----------------------------------------------------------------------------
030: * $Log: DefaultMaskAuthenticator.java,v $
031: * Revision 1.7 2005/10/11 18:54:06 colinmacleod
032: * Fixed some checkstyle and javadoc issues.
033: *
034: * Revision 1.6 2005/10/02 14:06:34 colinmacleod
035: * Added/improved log4j logging.
036: *
037: * Revision 1.5 2005/09/14 13:23:58 colinmacleod
038: * Added serialVersionUID.
039: *
040: * Revision 1.4 2005/04/11 14:46:58 colinmacleod
041: * Now implements Serializable.
042: *
043: * Revision 1.3 2005/04/09 18:04:18 colinmacleod
044: * Changed copyright text to GPL v2 explicitly.
045: *
046: * Revision 1.2 2005/01/07 08:08:24 colinmacleod
047: * Moved up a version number.
048: * Changed copyright notices to 2005.
049: * Updated the documentation:
050: * - started working on multiproject:site docu.
051: * - changed the logo.
052: * Added checkstyle and fixed LOADS of style issues.
053: * Added separate thirdparty subproject.
054: * Added struts (in web), util and webgui (in webtheme) from ivata op.
055: *
056: * Revision 1.1 2004/12/23 21:28:31 colinmacleod
057: * Modifications to add ivata op compatibility.
058: * -----------------------------------------------------------------------------
059: */
060: package com.ivata.mask.web.struts;
061:
062: import org.apache.log4j.Logger;
063:
064: import java.io.Serializable;
065:
066: import javax.servlet.ServletContext;
067: import javax.servlet.http.HttpServletRequest;
068: import javax.servlet.http.HttpSession;
069:
070: import com.ivata.mask.util.SystemException;
071:
072: /**
073: * This class let's all user sessions be authenticated.
074: *
075: * @since ivata masks 0.3 (2004-11-12)
076: * @author Colin MacLeod
077: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
078: * @version $Revision: 1.7 $
079: */
080: public final class DefaultMaskAuthenticator implements
081: MaskAuthenticator, Serializable {
082: /**
083: * Logger for this class.
084: */
085: private static final Logger logger = Logger
086: .getLogger(DefaultMaskAuthenticator.class);
087:
088: /**
089: * Serialization version (for <code>Serializable</code> interface).
090: */
091: private static final long serialVersionUID = 1L;
092:
093: /**
094: * <p>
095: * Always authenticates, by always returning <code>null</code>.
096: * </p>
097: *
098: * @param sessionParam {@inheritDoc}
099: * @param requestParam {@inheritDoc}
100: * @param servletContextParam {@inheritDoc}
101: * @param login <code>true</code> if the user is performing a login action,
102: * otherwise <code>false</code>.
103: * @return always <code>null</code>.
104: * @throws SystemException Never thrown by this implementation.
105: * @see com.ivata.mask.web.struts.MaskAuthenticator#authenticate
106: */
107: public String authenticate(final HttpSession sessionParam,
108: final HttpServletRequest requestParam,
109: final ServletContext servletContextParam,
110: final boolean login) throws SystemException {
111: if (logger.isDebugEnabled()) {
112: logger.debug("authenticate(HttpSession sessionParam = "
113: + sessionParam
114: + ", HttpServletRequest requestParam = "
115: + requestParam
116: + ", ServletContext servletContextParam = "
117: + servletContextParam + ", boolean login = "
118: + login + ") - start");
119: }
120:
121: if (logger.isDebugEnabled()) {
122: logger.debug("authenticate - end - return value = " + null);
123: }
124: return null;
125: }
126: }
|