Spring security中j_spring_security_check,流程
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/06 03:08:10
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;
找到了,马虎!就在同文件上面
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的执行流程,图解
我快看完了 非常有用的东西哈
话说你这个问题.真扯 哈哈
再问: 谢谢,有时间我也看一下!
我快看完了 非常有用的东西哈
话说你这个问题.真扯 哈哈
再问: 谢谢,有时间我也看一下!