I have a project that needs to be split into two webservers. Both of them however should use the same domain class for login of users. From reading all over the web I got the idea that making a plugin with the spring security domain classes and using it in the webserver-projects would be a good idea, but I can't get it to work. I got so many different error messages, I don't even know if anything I am doing is a good idea.
What would be the recommended way to create a library/plugin that can be used to include domain classes meant to be used for other grails projects?
Roughly my current setup is this:
- create plugin project
- create webserver project
- add spring security to the plugin project
- use s2-quickstart to generate User and Role in the plugin project
- setup the two projects as a multiproject with a respective settings.gradle
- add compile project(:plugin) to the webserver project
- copy over the spring security configuration from the plugin project to the webserver project
- add some default users to the webserver project via setup code in Bootstrap.groovy
- run the webserver and try to login
However currently my problem with this is that it fails to login, it just tells me "that user does not exist".
Is there any known way of doing this? I've searched around a lot, but either things don't work at all like described in tutorials or the tutorials are for grails 2.