1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.administration;
18
19 import org.apache.jetspeed.administration.PortalAuthenticationConfiguration;
20
21 /***
22 * PasswordCredentialValve
23 *
24 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
25 * @version $Id: $
26 */
27 public class PortalAuthenticationConfigurationImpl implements PortalAuthenticationConfiguration
28 {
29 protected boolean createNewSessionOnLogin = false;
30 protected int maxSessionHardLimit = 0;
31 protected long msMaxSessionHardLimit = 1;
32 protected String timeoutRedirectLocation = "";
33
34 /***
35 * Portal Authentication Configuration stored and accessed from this bean
36 *
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 feature
39 * @param timeoutRedirectLocation Path to redirection upon logging out user on session limit experiation, only used with maxSessionHardLimit
40 */
41 public PortalAuthenticationConfigurationImpl(boolean createNewSessionOnLogin, int maxSessionHardLimit, String timeoutRedirectLocation)
42 {
43 this.createNewSessionOnLogin = createNewSessionOnLogin;
44 this.maxSessionHardLimit = maxSessionHardLimit;
45 this.timeoutRedirectLocation = timeoutRedirectLocation;
46 this.msMaxSessionHardLimit = this.maxSessionHardLimit * 1000;
47 }
48
49 public boolean isMaxSessionHardLimitEnabled()
50 {
51 return this.maxSessionHardLimit > 0;
52 }
53
54 public int getMaxSessionHardLimit()
55 {
56 return maxSessionHardLimit;
57 }
58
59
60 public void setMaxSessionHardLimit(int maxSessionHardLimit)
61 {
62 this.maxSessionHardLimit = maxSessionHardLimit;
63 }
64
65
66 public long getMsMaxSessionHardLimit()
67 {
68 return msMaxSessionHardLimit;
69 }
70
71
72 public void setMsMaxSessionHardLimit(long msMaxSessionHardLimit)
73 {
74 this.msMaxSessionHardLimit = msMaxSessionHardLimit;
75 }
76
77
78 public String getTimeoutRedirectLocation()
79 {
80 return timeoutRedirectLocation;
81 }
82
83
84 public void setTimeoutRedirectLocation(String timeoutRedirectLocation)
85 {
86 this.timeoutRedirectLocation = timeoutRedirectLocation;
87 }
88
89
90
91 public boolean isCreateNewSessionOnLogin()
92 {
93 return createNewSessionOnLogin;
94 }
95
96
97
98 public void setCreateNewSessionOnLogin(boolean createNewSessionOnLogin)
99 {
100 this.createNewSessionOnLogin = createNewSessionOnLogin;
101 }
102
103 }