001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.security.auth;
016    
017    import javax.servlet.http.HttpServletRequest;
018    import javax.servlet.http.HttpServletResponse;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public interface AutoLogin {
024    
025            /**
026             * Set a request attribute with this variable to tell the AutoLoginFilter to
027             * stop processing filters and redirect the user to a specified location.
028             */
029            public static final String AUTO_LOGIN_REDIRECT = "AUTO_LOGIN_REDIRECT";
030    
031            /**
032             * Set a request attribute with this variable to tell the AutoLoginFilter to
033             * continue processing filters and then redirect the user to a specified
034             * location.
035             */
036            public static final String AUTO_LOGIN_REDIRECT_AND_CONTINUE =
037                    "AUTO_LOGIN_REDIRECT_AND_CONTINUE";
038    
039            public String[] handleException(
040                            HttpServletRequest request, HttpServletResponse response,
041                            Exception e)
042                    throws AutoLoginException;
043    
044            public String[] login(
045                            HttpServletRequest request, HttpServletResponse response)
046                    throws AutoLoginException;
047    
048    }