Change login page for spring security plugin in grails

后端 未结 2 1449
温柔的废话
温柔的废话 2021-02-08 02:06

Is there a way that I can create my own custom login page and send the data to login controller of spring security plugin. I currently see my code redirecting directly to the de

相关标签:
2条回答
  • 2021-02-08 02:46

    The 2.0 plugin comes with its own auth.gsp page, so if you create your own (either modify the plugin's or create your own) and put it in grails-app/views/login/auth.gsp it will be used. In 1.2.x the auth.gsp is in your app source, so edit it there.

    If you want to further customize the login process, I did a talk at http://burtbeckwith.com/blog/?p=1090 and there's some sample code that adds a 3rd login parameter. That code is based on the 1.2.x plugin and would need to be updated for 2.0, but the ideas are the same.

    0 讨论(0)
  • 2021-02-08 02:53

    I copied the file auth.gsp from here:

    https://github.com/grails-plugins/grails-spring-security-core/blob/master/grails-app/views/login/auth.gsp

    to grails-app/views/login/auth.gsp

    0 讨论(0)
提交回复
热议问题