cleanup in the registration process
This commit is contained in:
+2
@@ -24,6 +24,8 @@ public class UserService implements IUserService {
|
||||
@Autowired
|
||||
private PasswordEncoder passwordEncoder;
|
||||
|
||||
// API
|
||||
|
||||
@Override
|
||||
public User registerNewUserAccount(UserDto accountDto) throws EmailExistsException {
|
||||
if (emailExist(accountDto.getEmail())) {
|
||||
|
||||
+4
-8
@@ -16,17 +16,13 @@ import org.springframework.security.authentication.dao.DaoAuthenticationProvider
|
||||
public class SecSecurityConfig {
|
||||
|
||||
@Autowired
|
||||
UserDetailsService userDetailsService;
|
||||
private UserDetailsService userDetailsService;
|
||||
|
||||
public SecSecurityConfig() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public BCryptPasswordEncoder encoder() {
|
||||
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(11);
|
||||
return encoder;
|
||||
}
|
||||
// beans
|
||||
|
||||
@Bean
|
||||
public DaoAuthenticationProvider authProvider() {
|
||||
@@ -37,8 +33,8 @@ public class SecSecurityConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PasswordEncoder passwordEncoder() {
|
||||
return new BCryptPasswordEncoder();
|
||||
public PasswordEncoder encoder() {
|
||||
return new BCryptPasswordEncoder(11);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user