1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * 9 * http://www.apache.org/licenses/LICENSE-2.010 * 11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17packageorg.apache.jetspeed.administration;
1819import org.apache.jetspeed.administration.PortalAuthenticationConfiguration;
2021/***22 * PasswordCredentialValve23 *24 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>25 * @version $Id: $26 */27publicclassPortalAuthenticationConfigurationImpl implements PortalAuthenticationConfiguration
28 {
29protectedboolean createNewSessionOnLogin = false;
30protectedint maxSessionHardLimit = 0;
31protectedlong msMaxSessionHardLimit = 1;
32protected String timeoutRedirectLocation = "";
3334/***35 * Portal Authentication Configuration stored and accessed from this bean36 * 37 * @param createNewSessionOnLogin Should a new session be created upon logging on to the system 38 * @param maxSessionHardLimit The maximum session hard limit, ignores user activity, set to zero to turn off this feature39 * @param timeoutRedirectLocation Path to redirection upon logging out user on session limit experiation, only used with maxSessionHardLimit40 */41publicPortalAuthenticationConfigurationImpl(boolean createNewSessionOnLogin, int maxSessionHardLimit, String timeoutRedirectLocation)
42 {
43this.createNewSessionOnLogin = createNewSessionOnLogin;
44this.maxSessionHardLimit = maxSessionHardLimit;
45this.timeoutRedirectLocation = timeoutRedirectLocation;
46this.msMaxSessionHardLimit = this.maxSessionHardLimit * 1000;
47 }
4849publicboolean isMaxSessionHardLimitEnabled()
50 {
51returnthis.maxSessionHardLimit > 0;
52 }
5354publicint getMaxSessionHardLimit()
55 {
56return maxSessionHardLimit;
57 }
585960publicvoid setMaxSessionHardLimit(int maxSessionHardLimit)
61 {
62this.maxSessionHardLimit = maxSessionHardLimit;
63 }
646566publiclong getMsMaxSessionHardLimit()
67 {
68return msMaxSessionHardLimit;
69 }
707172publicvoid setMsMaxSessionHardLimit(long msMaxSessionHardLimit)
73 {
74this.msMaxSessionHardLimit = msMaxSessionHardLimit;
75 }
767778public String getTimeoutRedirectLocation()
79 {
80return timeoutRedirectLocation;
81 }
828384publicvoid setTimeoutRedirectLocation(String timeoutRedirectLocation)
85 {
86this.timeoutRedirectLocation = timeoutRedirectLocation;
87 }
88899091publicboolean isCreateNewSessionOnLogin()
92 {
93return createNewSessionOnLogin;
94 }
95969798publicvoid setCreateNewSessionOnLogin(boolean createNewSessionOnLogin)
99 {
100this.createNewSessionOnLogin = createNewSessionOnLogin;
101 }
102103 }