Skip to content

Commit 8658e2b

Browse files
committed
Fix login bug
1 parent 7df2acf commit 8658e2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/top/whgojp/security/SecurityConfigurer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ protected void configure(HttpSecurity http) throws Exception {
116116
.successHandler(authenticationSuccessHandler())
117117
.failureHandler(customSimpleUrlAuthenticationFailureHandler());
118118

119-
120-
http.exceptionHandling().authenticationEntryPoint(new HttpStatusEntryPoint(HttpStatus.BAD_REQUEST));
119+
// TODO: 2025/1/12 解决登录就报错400状态码问题 GPT害死人啊 注释后就没问题了
120+
// 设置自定义的未认证用户访问受保护资源时的响应行为,并在用户未通过认证时返回 HTTP 状态码 400 BAD_REQUEST
121+
// http.exceptionHandling().authenticationEntryPoint(new HttpStatusEntryPoint(HttpStatus.BAD_REQUEST));
121122

122123
http.logout()
123124
.logoutSuccessHandler(customLogoutSuccessHandler())

0 commit comments

Comments
 (0)