package com.ankurm.stubissuer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.web.SecurityFilterChain; /** * The stub issuer authenticates nobody. Defining any {@code SecurityFilterChain} bean makes * Boot’s default chain back off, which is the whole purpose of this class. */ @Configuration public class StubSecurityConfig { @Bean SecurityFilterChain open(HttpSecurity http) throws Exception { return http.csrf((csrf) -> csrf.disable()) .authorizeHttpRequests((auth) -> auth.anyRequest().permitAll()) .build(); } }