diff options
author | xg353y <xg353y@intl.att.com> | 2018-05-23 18:02:49 +0200 |
---|---|---|
committer | xg353y <xg353y@intl.att.com> | 2018-05-23 18:02:49 +0200 |
commit | 0c2ab13d9082643188690e31d82cdf7a32449a2e (patch) | |
tree | 1ae1618d2e4035277476390041642ea71941b0b3 /src/main/java/org | |
parent | 2206cf470405b527b5d666cf657f011eac6e0b80 (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/org')
-rw-r--r-- | src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java | 6 |
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 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); |