From 0c2ab13d9082643188690e31d82cdf7a32449a2e Mon Sep 17 00:00:00 2001 From: xg353y Date: Wed, 23 May 2018 18:02:49 +0200 Subject: 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 --- .../org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java') 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 aabb6cf0b..961cc6b35 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); -- cgit 1.2.3-korg