feat: 隐藏错误
This commit is contained in:
parent
e55c7a29bd
commit
d52b5ad477
@ -16,6 +16,7 @@ import org.springframework.security.core.context.SecurityContext;
|
||||
import org.springframework.security.core.context.SecurityContextImpl;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.web.server.context.ServerSecurityContextRepository;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -51,7 +52,6 @@ public class MongoUserDetailsServiceImpl implements MongoUserDetailsService {
|
||||
}
|
||||
|
||||
private final ReactiveUserService userService;
|
||||
private final PasswordEncoder passwordEncoder;
|
||||
|
||||
@Resource
|
||||
private ServerSecurityContextRepository contextRepository;
|
||||
@ -59,10 +59,11 @@ public class MongoUserDetailsServiceImpl implements MongoUserDetailsService {
|
||||
private ReactiveAuthenticationManager authenticationManager;
|
||||
|
||||
@PostConstruct
|
||||
@SuppressWarnings("deprecation")
|
||||
private void init() {
|
||||
UserDetailsRepositoryReactiveAuthenticationManager manager =
|
||||
new UserDetailsRepositoryReactiveAuthenticationManager(this);
|
||||
manager.setPasswordEncoder(passwordEncoder);
|
||||
manager.setPasswordEncoder(NoOpPasswordEncoder.getInstance());
|
||||
authenticationManager = manager;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user