#63 fixed a circular spring dependency

This commit is contained in:
Fabio Formosa
2022-10-07 22:31:46 +02:00
parent 8ee0435738
commit c70dc3181e

View File

@@ -63,9 +63,6 @@ public class WebSecurityConfigJWT extends WebSecurityConfigurerAdapter {
@Autowired
private ObjectMapper objectMapper;
@Autowired
private UserDetailsService userDetailsService;
@Autowired
private InMemoryAccountProperties inMemoryAccountProps;
@@ -85,10 +82,6 @@ public class WebSecurityConfigJWT extends WebSecurityConfigurerAdapter {
QuartzManagerHttpSecurity.from(http).withLoginConfigurer(loginConfigurer(), logoutConfigurer()) //
.login(QUARTZ_MANAGER_LOGIN_PATH, authenticationManager()).logout(QUARTZ_MANAGER_LOGOUT_PATH);
// temporary disabled csfr
// http.csrf().ignoringAntMatchers("/api/login", "/api/signup") //
// .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) //
}
@Override
@@ -133,8 +126,8 @@ public class WebSecurityConfigJWT extends WebSecurityConfigurerAdapter {
}
// @Bean
public JwtTokenAuthenticationFilter jwtAuthenticationTokenFilter() {
return new JwtTokenAuthenticationFilter(jwtTokenHelper(), userDetailsService);
public JwtTokenAuthenticationFilter jwtAuthenticationTokenFilter() throws Exception {
return new JwtTokenAuthenticationFilter(jwtTokenHelper(), userDetailsServiceBean());
}
@Bean