Skip to content

Commit

Permalink
Fix #1436: WebFlow Client error on startup due to MVC request matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Oct 3, 2023
1 parent dea6f99 commit ada3e6e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;

import java.util.LinkedHashMap;
import java.util.Map;
Expand Down Expand Up @@ -63,7 +64,12 @@ public SecurityFilterChain filterChain(final HttpSecurity http) throws Exception
return http
.httpBasic(AbstractHttpConfigurer::disable)
.authorizeHttpRequests(requests -> requests
.requestMatchers("/", "/home", "/css/**", "/js/**", "/images/**").permitAll()
.requestMatchers(new AntPathRequestMatcher("/"),
new AntPathRequestMatcher("/home"),
new AntPathRequestMatcher("/css/**"),
new AntPathRequestMatcher("/js/**"),
new AntPathRequestMatcher("/images/**"))
.permitAll()
.anyRequest().fullyAuthenticated()
)
.oauth2Login(login -> login
Expand Down

0 comments on commit ada3e6e

Please sign in to comment.