Search code examples
springgrailsspring-securityspring-bootgrails-3.0

Spring Boot Security login.html location in Grails 3.0


I've just implemented Spring Boot Security in my Grails 3.0.1. I want to customize the default Spring Boot login form, but I can't find the login.html anywhere.

I've read all kinds of tutorials and documentations and the login.html location should be in "src/main/resources/templates/login.html" which does not exist in my project.

Here is the 3 part tutorial series that I followed while implementing Spring Boot to Grails 3.0.1 http://spiesdavid.blogspot.fi/2015/03/grails-3-app-with-security-part-1.html


Solution

  • I solved that problem, there is a lot of work to do. I needed to create 2 controllers, one of them was my new login page's controller and another to submit the login form (empty). The next step is creating an interceptor, it will capure the requests to the second controller, and in the before method, it will do the login process (it must have a reference to the AuthenticationManager, by default a ProviderManager) Finally, I created a new authentication provider, responsible for making authentication, and it must be assigned to AuthenticationManager