fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Usman Khaliq <>
Subject Limiting Concurrent User Sessions to 1
Date Wed, 10 May 2017 13:23:38 GMT
Hi everyone,

I have written the following code in the infrastructure/core/boot directory
to set the number of concurrent user sessions at 1:

public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    protected void configure(HttpSecurity http) throws Exception {

    // Work around
    public SessionRegistry sessionRegistry() {
        SessionRegistry sessionRegistry = new SessionRegistryImpl();
        return sessionRegistry;

    public void configureGlobal(AuthenticationManagerBuilder auth) throws
Exception {

    // Register HttpSessionEventPublisher
    public static ServletListenerRegistrationBean
httpSessionEventPublisher() {
        return new ServletListenerRegistrationBean(new

I have also registered the Spring Security filter created above in the
AbstractSecurityWebApplicationInitializer in the infrastructure/core/boot
directory as follows:

public class SecurityWebApplicationInitializer
    extends AbstractSecurityWebApplicationInitializer {
    protected Class<?>[] getRootConfigClasses() {
        return new Class[] { WebSecurityConfig.class };
However, I am still able to log into multiple browser sessions from my
machine. Any advise on what I am doing wrong with my code? Thanks in

Kind Regards
Usman Khaliq
Programmer and R&D Lead
iDT Labs
5 Foday Drive,Regent Road,Hill Station
Freetown,Sierra Leone
Tel: +92334 3777 059/ + 232 77 775 775
Skype: usman.khaliq

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message