cleanup in the registration process

This commit is contained in:
eugenp 2015-01-04 13:39:09 +02:00
parent 4179c843b8
commit ff38ebf0dd
2 changed files with 6 additions and 8 deletions

View File

@ -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())) {

View File

@ -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);
}
}