Results 1 to 3 of 3

Thread: ACEGI:How to get all connected users?

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Posts
    2

    Default ACEGI:How to get all connected users?

    How can I get a list with all connected users?

  2. #2
    Join Date
    Apr 2007
    Location
    France
    Posts
    23

    Default

    You could use the concurrent sessions handling architecture
    static.springframework.org/spring-security/site/reference/html/authentication-common-auth-services.html#concurrent-sessions and use sessionRegistry.getAllPrincipals() methods, although that implementation would prevent simultaneous logins with the same credentials.

  3. #3
    Join Date
    Jun 2008
    Posts
    2

    Default

    Thank you, it works very well. I need the list with the connected users in order to manage these users. In this way I can force to end the session for all connected users:

    Object[] obj=sessionRegistry.getAllPrincipals();
    for (Object o:obj){
    SessionInformation[] sis= sessionRegistry.getAllSessions(o, true);
    sis[0].expireNow();
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •