optimize: set friendly prompts when the login user does not exist and the password is wrong

pull/1193/head^2
lucca 2 years ago
parent 84370e595f
commit 1fb73f55a2

@ -107,10 +107,9 @@ public class GlobalSecurityConfig extends WebSecurityConfigurerAdapter {
}
/**
* DaoAuthentication
* void configure(AuthenticationManagerBuilder auth)
* hideUserNotFoundExceptions false
* UserNotFoundException
* Injection DaoAuthenticationProvider
* Modify hideUserNotFoundExceptions initial value to false
* Solve the problem of UserNotFoundException don't throw
*/
@Bean
public DaoAuthenticationProvider authenticationProvider() {

@ -117,7 +117,7 @@ public class JWTAuthenticationFilter extends UsernamePasswordAuthenticationFilte
}
/**
*
* Return different echo information to the front end according to different exception types
*/
protected String getMessage(AuthenticationException failed) {
String message = "Server Error";

Loading…
Cancel
Save