Grails springSecurityService.currentUser returns null
问题 I have this service class: class UserService { def springSecurityService @Listener(topic = 'currentUser', namespace = 'auth') public User getCurrentUser(){ return springSecurityService.currentUser } def authenticate(OAuthToken oAuthToken){ SecurityContextHolder.context.authentication = oAuthToken return springSecurityService.currentUser } } If I use the authenticate method, springSecurityService.currentUser returns the current user. But if I am already logged in I want to get a current user