- All Implemented Interfaces and Traits:
- ApplicationContextAware, ApplicationListener<ApplicationEvent>
@groovy.transform.CompileStatic
class RestSecurityEventListener
extends SecurityEventListener
implements ApplicationContextAware, ApplicationListener<ApplicationEvent>
Registers as an event listener and delegates handling of security-related events
to optional closures defined in Config.groovy.
The following callbacks are supported:
All callbacks are optional; you can implement just the ones you're interested in, e.g.
grails {
plugin {
springsecurity {
...
onRestTokenCreationEvent = { e, appCtx ->
...
}
}
}
}
The event and the Spring context are provided in case you need to look up a Spring bean,
e.g. the Hibernate SessionFactory.