aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorxg353y <xg353y@intl.att.com>2018-05-23 18:02:49 +0200
committerxg353y <xg353y@intl.att.com>2018-05-23 18:02:49 +0200
commit0c2ab13d9082643188690e31d82cdf7a32449a2e (patch)
tree1ae1618d2e4035277476390041642ea71941b0b3 /src/main/java
parent2206cf470405b527b5d666cf657f011eac6e0b80 (diff)
Add session timeout page
Page timeout.html will be loaded at the session timeout, so that client can re-login. Issue-ID: CLAMP-166 Change-Id: Ie6af79e993480162b1becf9a01b99c70ec831354 Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java b/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java
index aabb6cf0..961cc6b3 100644
--- a/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java
+++ b/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java
@@ -74,7 +74,11 @@ public class CldsSecurityConfigUsers extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) {
try {
http.csrf().disable().httpBasic().and().authorizeRequests().antMatchers("/restservices/clds/v1/user/**")
- .authenticated().anyRequest().permitAll().and().logout();
+ .authenticated().anyRequest().permitAll().and().logout()
+ .and().sessionManagement()
+ .maximumSessions(1)
+ .and().invalidSessionUrl("/designer/timeout.html");
+
} catch (Exception e) {
logger.error("Exception occurred during the setup of the Web users in memory", e);
throw new CldsUsersException("Exception occurred during the setup of the Web users in memory", e);