cleanup in the registration process
This commit is contained in:
parent
4179c843b8
commit
ff38ebf0dd
|
@ -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())) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue