Servlets Spring Security:关于表单中的j_用户名和j_密码

Servlets Spring Security:关于表单中的j_用户名和j_密码,servlets,spring-security,Servlets,Spring Security,嗨,我正在读一本关于春季安全的书。它讨论了j_用户名和j_密码的具体名称 The form field names are specified by UsernamePasswordAuthenticationFilter itself, and take their cue from the Java EE Servlet 2.x specification (in section SRV.12.5.3), which requires that login forms use these s

嗨,我正在读一本关于春季安全的书。它讨论了j_用户名和j_密码的具体名称

The form field names are specified by UsernamePasswordAuthenticationFilter
itself, and take their cue from the Java EE Servlet 2.x specification (in section
SRV.12.5.3), which requires that login forms use these specific field names, plus
the special form action j_security_check. This design pattern was intended to
allow authors of Java EE servlet-based applications to tie into the servlet container's
security configuration in a standard way.
我无法理解上述陈述。这个“设计模式”的目的是什么 允许基于JavaEEServlet的应用程序的作者绑定到servlet容器的
以标准方式“mean?”进行安全配置

由于这些表单字段名是servlet规范的一部分,规范作者的意图是您可以交换底层安全提供程序(例如,从Spring安全转移到Java EE应用服务器的安全基础设施)无需对登录表单字段名称进行任何更改

然而,这在实践中是否有效,则完全是另一回事;)

--彼得(作者,春季安全3(书))