Skip to content
Snippets Groups Projects
Commit b8d3df3a authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

Merge branch 'feature/oidc' into 'master'

fix login and logou paths

See merge request !14
parents 02c6bfca 0ccd15da
No related branches found
No related tags found
1 merge request!14fix login and logou paths
......@@ -64,17 +64,19 @@ public class SmartHarvesterSecurityConfiguration extends WebSecurityConfigurerAd
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable().cors().and().authorizeRequests().antMatchers("/harvester/oauth2/**","/oauth2/**", "/login**", "/smart-harvester/**", "/harvester/api/catalogs","/resources/**", "/public/error/css/**", "/smart-docs/**").permitAll()
http.csrf().disable().cors().and().authorizeRequests().antMatchers("/harvester/logout","/harvester/oauth2/**","/oauth2/**", "/harvester/login/**", "/smart-harvester/**", "/harvester/api/catalogs","/resources/**", "/public/error/css/**", "/smart-docs/**").permitAll()
.anyRequest().authenticated()
.and()
.oauth2Login().authorizationEndpoint().baseUri("/harvester/oauth2/authorization")
.oauth2Login().loginProcessingUrl("/harvester/login")
.authorizationEndpoint().baseUri("/harvester/oauth2/authorization")
.authorizationRequestRepository(new InMemoryRequestRepository())
.and()
.successHandler(this::successHandler)
.and()
.exceptionHandling().authenticationEntryPoint(this::authenticationEntryPoint)
.and()
.logout(cust -> cust.addLogoutHandler(this::logout).logoutSuccessHandler(this::onLogoutSuccess));
.logout(cust -> cust.addLogoutHandler(this::logout).logoutUrl("/harvester/logout")
.logoutSuccessHandler(this::onLogoutSuccess));
http.addFilterBefore(tokenFilter, UsernamePasswordAuthenticationFilter.class);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment