Grails spring 已弃用 SPRING_SECURITY_LAST_USERNAME_KEY 的安全替代方案
Grails spring security alternative for deprecated SPRING_SECURITY_LAST_USERNAME_KEY
我正在开发一个 grails 应用程序,我需要 fiddle 使用 Session 变量来实现自定义 Spring 安全身份验证,并且需要设置以下 -
request.session[SPRING_SECURITY_LAST_USERNAME_KEY] =
TextEscapeUtils.escapeEntities(username)
现在这个密钥来自org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY
现在已弃用。你能给我推荐一个替代方案吗?
是的,我遇到了同样的问题。它有一个非常简单的替代方案-
import grails.plugin.springsecurity.SpringSecurityUtils;
现在使用 SpringSecurityUtils.SPRING_SECURITY_LAST_USERNAME_KEY
这将有效并且不会被弃用。
我正在开发一个 grails 应用程序,我需要 fiddle 使用 Session 变量来实现自定义 Spring 安全身份验证,并且需要设置以下 -
request.session[SPRING_SECURITY_LAST_USERNAME_KEY] =
TextEscapeUtils.escapeEntities(username)
现在这个密钥来自org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY
现在已弃用。你能给我推荐一个替代方案吗?
是的,我遇到了同样的问题。它有一个非常简单的替代方案-
import grails.plugin.springsecurity.SpringSecurityUtils;
现在使用 SpringSecurityUtils.SPRING_SECURITY_LAST_USERNAME_KEY
这将有效并且不会被弃用。