How to find all logged in users in grails application

In this tutorial we assume that we already have grails application with Spring Security core plugin installed. We will explore how to retrieve currently logged-in users using the SessionRegistry. What is SessionRegistry? Maintains a registry of SessionInformation instances. Inject sessionRegistry as a bean in resources.groovy as follows import org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy import org.springframework.security.web.session.ConcurrentSessionFilter import org.springframework.security.core.session.SessionRegistryImpl beans =Read More…

Categories: Grails
Share: