I am trying to write a plugin which I can reuse in several grails applications. The plugin should basically be a wrapper for the spring security core and the ldap plugin.
Which means it should contain:
- The domain classes for the user/roles
- The configuration for spring security (the mapping to these domain classes, some default URL access role configuration)
My problem is that i can't get the configuration inside my plugin working. I am confused by the examples I found so far: sometimes I read that the configuration should simply go to "Config.groovy" however grails docs state that this file isn't part of a plugin in the end. In some examples it says that you have to put the configuration in any other .groovy file and wrap it with some identifier like so:
myConfigName {
// normal config here
}
and then load it in the doWithSpring
closure in the MyWrapperPlugin.groovy class via some slurper. However if i understand this correctly, this will only put the configuration in a grails.plugin.mywrapper
namespace.
I could not find any example which tries to achieve the same thing (setting the configuraiton of a plugin inside another plugin) up to now.
Any examples/hints are appreciated, thanks!