@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity)throws Exception{
httpSecurity
.addFilterBefore(new JwtAuthenticationFilter(userDetailsService,jwtTokenHelper), UsernamePasswordAuthenticationFilter.class)
.csrf(csrf -> csrf.disable())
.authorizeHttpRequests((request)->{
request
.requestMatchers("/api/v1/auth/**").permitAll()
.anyRequest().authenticated();
})
.sessionManagement((session)-> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.logout(LogoutConfigurer::permitAll);
return httpSecurity.build();
}
Above is SecurityFilterChain code , in springboot 6 where to add AuthenticationEntryPoint or any other ways to achieve same goal?