Spring Security with Grails 3

I am a big user and advocate of Grails, and I was curious about working with Grails 3, so I started taking a look at it during the M2 release. Most of the applications I work on require authentication/authorization, and allĀ of them that do so, use Spring Security to do it.

In the Grails 2.x applications I have worked on, I have always used the awesome Grails Spring Security plugin. I noticed that so far, it hasn’t been updated to support working with Grails 3, but I don’t see that as a huge issue. I had been a Spring developer long before I had come to Grails, so I figured I would just tackle the problem the “old-fashioned way” with Spring Beans and DI.

I won’t go over the demo here in this blog post. You can find the code out on GitHub, and the README explains how to run through the different scenarios for authentication/authorization. Hopefully my code can help you out, if you are looking to start integrating Spring Security with Grails 3, and need to do so before a plugin is available for use.

Posted in Grails | Tagged , , , , , , | 3 Comments