https://spring.io/guides/tutorials/spring-boot-oauth2 Been going through this and trying to upgrade it to use spring 3.0 A lot of details looked transferrable but I'm getting unauthorized 401 on / (home page). I thought that the following would allow access without any auth restrictions for the given paths:
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
logger.debug("Configuring SecurityFilterChain");
SimpleUrlAuthenticationFailureHandler handler = new SimpleUrlAuthenticationFailureHandler("/");
http
.authorizeHttpRequests(authz -> authz
.requestMatchers("/").permitAll()
.requestMatchers("/error/**").permitAll()
.requestMatchers("/webjars/**").permitAll()
.anyRequest().authenticated()
)
Also welcome any tips in general