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