我知道有非标准框架,如commons-validator和hibernate验证器.
我想知道是否有人知道官方标准的实施.
应用程序记录所有请求的urls.这意味着,使用url参数进行身份验证至关重要,因为这会导致日志中充满对的情况(login=abc&password=123).出于这个原因,我已配置spring-security为从中读取参数request-body.这是通过将以下行添加到request-header:
'Content-Type': 'application/x-www-form-urlencoded'
Run Code Online (Sandbox Code Playgroud)
身体将是:
{'login':'admin', 'password':'password'}
Run Code Online (Sandbox Code Playgroud)
没关系,但QA强迫我通过url参数禁用身份验证的可能性.目前,对以下URL的POST也将进行身份验证:
https://example.com/foo?login=admin&password=password
Run Code Online (Sandbox Code Playgroud)
有没有人知道禁用此选项的技巧?最好带注释.
由于评论,我决定在我的问题中添加更多细节.我的弹簧安全配置spring-security.我有
http.usernameParameter("login")
.passwordParameter("password")
(...)
Run Code Online (Sandbox Code Playgroud)
这使得WebSecurityConfigurerAdapter在参数和正文中搜索登录数据.我希望禁用在网址中搜索这些参数.