I have a grails 2.1.0 application with Spring Security Core and Multi-tenant single db plugin working fine. One of the requirements for this application is to limit concurrent logins to just one. For this, I’m trying to use SpringSecurityUtils in Bootstrap to register a filter.
SpringSecurityUtils.clientRegisterFilter('concurrencyFilter', SecurityFilterPosition.CONCURRENT_SESSION_FILTER)
SpringSecurityUtils is static and as the documentation says, need not be injected, but on executing, it errors out
ERROR context.GrailsContextLoader - Error executing bootstraps: No such property: SpringSecurityUtils for class: BootStrap
Message: No such property: SpringSecurityUtils for class: BootStrap
Line | Method
->> 17 | doCall in BootStrap$_closure1
| 301 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 294 | executeForEnvironment . . . . . in ”
| 270 | executeForCurrentEnvironment in ”
| 303 | innerRun . . . . . . . . . . . . in java.util.concurrent.FutureTask$Sync
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ”
^ 662 | run . . . . . . . . . . . . . . in java.lang.Thread
Spring security is otherwise working fine.
Any help is much appreciated.
You’re missing the import – add
and it looks like you’ll need this too: