Spring security中j_spring_security_check,流程j_spring_security_check验证登录的表单信息中j_username,j_password被传走,但是我在org.springframework.security.ui.webapp的AuthenticationProcessingFilter.java看到String username = obtain
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/09 05:03:04
Spring security中j_spring_security_check,流程j_spring_security_check验证登录的表单信息中j_username,j_password被传走,但是我在org.springframework.security.ui.webapp的AuthenticationProcessingFilter.java看到String username = obtain
Spring security中j_spring_security_check,流程
j_spring_security_check验证登录的表单信息中j_username,j_password被传走,但是我在org.springframework.security.ui.webapp的AuthenticationProcessingFilter.java看到
String username = obtainUsername(request);
String password = obtainPassword(request);
protected String obtainUsername(HttpServletRequest request) {
return request.getParameter(usernameParameter);
}这里不是应该是request.getParameter(j_username)吗?看样是中途对数据洗过(usernameParameter=j_username)然后放在了request里又传过来,求洗数据的函数调用堆栈麻烦加上文件名!
public static final String SPRING_SECURITY_FORM_USERNAME_KEY = "j_username";
public static final String SPRING_SECURITY_FORM_PASSWORD_KEY = "j_password";
public static final String SPRING_SECURITY_LAST_USERNAME_KEY = "SPRING_SECURITY_LAST_USERNAME";
private String usernameParameter = SPRING_SECURITY_FORM_USERNAME_KEY;
private String passwordParameter = SPRING_SECURITY_FORM_PASSWORD_KEY;
找到了,马虎!就在同文件上面
Spring security中j_spring_security_check,流程j_spring_security_check验证登录的表单信息中j_username,j_password被传走,但是我在org.springframework.security.ui.webapp的AuthenticationProcessingFilter.java看到String username = obtain
上面有spring security的执行流程,图解
我快看完了 非常有用的东西哈
话说你这个问题.真扯 哈哈