JAVA-27461 | removing spring security deprecations.
This commit is contained in:
parent
fc91dd6337
commit
b0a0d8c247
|
@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer;
|
|||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
|
||||
import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
||||
|
@ -18,8 +19,7 @@ public class KeycloakSecurityConfig {
|
|||
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
http.csrf()
|
||||
.disable()
|
||||
http.csrf(AbstractHttpConfigurer::disable)
|
||||
.authorizeHttpRequests(auth -> auth.anyRequest()
|
||||
.authenticated())
|
||||
.oauth2ResourceServer((oauth2) -> oauth2
|
||||
|
|
Loading…
Reference in New Issue