diff --git a/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java b/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java index 8501f3474df1d1defb58d9d0e751435d6e5cff64..dd6be10aae37b005f64d70964bfc2313fec21408 100644 --- a/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java +++ b/src/main/java/com/smartharvester/config/SmartHarvesterSecurityConfiguration.java @@ -64,10 +64,11 @@ public class SmartHarvesterSecurityConfiguration extends WebSecurityConfigurerAd @Override protected void configure(HttpSecurity http) throws Exception { - http.csrf().disable().cors().and().authorizeRequests().antMatchers("/oauth2/**", "/login**", "/smart-harvester/**", "/harvester/api/catalogs","/resources/**", "/public/error/css/**", "/smart-docs/**").permitAll() + http.csrf().disable().cors().and().authorizeRequests().antMatchers("/harvester/oauth2/**","/oauth2/**", "/login**", "/smart-harvester/**", "/harvester/api/catalogs","/resources/**", "/public/error/css/**", "/smart-docs/**").permitAll() .anyRequest().authenticated() .and() - .oauth2Login().authorizationEndpoint().authorizationRequestRepository(new InMemoryRequestRepository()) + .oauth2Login().authorizationEndpoint().baseUri("/harvester/oauth2/authorization") + .authorizationRequestRepository(new InMemoryRequestRepository()) .and() .successHandler(this::successHandler) .and()