返回用户名和密码登录grails spring security [英] Return username and password to login form grails spring security
问题描述
当用户身份验证失败时,我希望将用户名和密码返回到表单。
我将Spring安全核心插件与Grails和Spring Security LDAP一起使用。我搜索了一段时间,并拿出了邮编。任何想法?
When a user fails authentication, I want the username and password to be returned to the form. I'm using the spring security core plugin with Grails and Spring Security LDAP. I've searched around for a while and have come up with zip. Any ideas?
推荐答案
从 UsernamePasswordAuthenticationFilter
javadoc:
如果您想保留用户名,请将其缓存在自定义的AuthenticationFailureHandler中
If you want to retain the username, cache it in a customized AuthenticationFailureHandler
至于密码,没有意义要缓存它,因为出于安全原因无法将它放回密码字段。
As for password there is no point to cache it, because it cannot be put back to form password field for security reasons.
这篇关于返回用户名和密码登录grails spring security的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!