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 * Injection DaoAuthenticationProvider
* void configure(AuthenticationManagerBuilder auth) * Modify hideUserNotFoundExceptions initial value to false
* hideUserNotFoundExceptions false * Solve the problem of UserNotFoundException don't throw
* UserNotFoundException
*/ */
@Bean @Bean
public DaoAuthenticationProvider authenticationProvider() { 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) { protected String getMessage(AuthenticationException failed) {
String message = "Server Error"; String message = "Server Error";

Loading…
Cancel
Save