Fixed issue with circular dependencies
This commit is contained in:
parent
7091258de4
commit
d94f7e3aa1
@ -29,15 +29,19 @@ import com.svlada.user.service.DatabaseUserService;
|
|||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class AjaxAuthenticationProvider implements AuthenticationProvider {
|
public class AjaxAuthenticationProvider implements AuthenticationProvider {
|
||||||
private final BCryptPasswordEncoder encoder;
|
private BCryptPasswordEncoder encoder;
|
||||||
private final DatabaseUserService userService;
|
private final DatabaseUserService userService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public AjaxAuthenticationProvider(final DatabaseUserService userService, final BCryptPasswordEncoder encoder) {
|
public void setProjectRepository(final BCryptPasswordEncoder encoder) {
|
||||||
this.userService = userService;
|
|
||||||
this.encoder = encoder;
|
this.encoder = encoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public AjaxAuthenticationProvider(final DatabaseUserService userService) {
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
|
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
|
||||||
Assert.notNull(authentication, "No authentication data provided");
|
Assert.notNull(authentication, "No authentication data provided");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user