在grails中更改spring security插件的登录页面 [英] Change login page for spring security plugin in grails

查看:283
本文介绍了在grails中更改spring security插件的登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以创建我自己的自定义登录页面并将数据发送到spring security plugin的登录控制器。我目前看到我的代码直接重定向到spring security plugin的默认登录页面。

解决方案

2.0插件附带自己的auth .gsp页面,所以如果你创建自己的(修改插件或创建自己的)并将其放入grails-app / views / login / auth.gsp中,它将被使用。在1.2.x中,auth.gsp位于您的应用程序源中,因此请在该处编辑。



如果您想进一步自定义登录过程,我在< a href =http://burtbeckwith.com/blog/?p=1090 =noreferrer> http://burtbeckwith.com/blog/?p=1090 ,还有一些示例代码增加了第三个登录参数。该代码基于1.2.x插件,需要更新为2.0,但想法相同。


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 default login page of spring security plugin.

解决方案

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.

这篇关于在grails中更改spring security插件的登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆