Skip to content
Snippets Groups Projects
Commit 401c1796 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-1190#OZG-1306 enable GlobalMethodSecurity

parent 4a25fcc7
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
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.builders.HttpSecurity;
import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper; import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper;
...@@ -19,6 +20,7 @@ import org.springframework.security.web.csrf.CookieCsrfTokenRepository; ...@@ -19,6 +20,7 @@ import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter; import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter;
import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter.XFrameOptionsMode; import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter.XFrameOptionsMode;
@EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true)
@KeycloakConfiguration @KeycloakConfiguration
public class SecurityConfiguration extends KeycloakWebSecurityConfigurerAdapter { public class SecurityConfiguration extends KeycloakWebSecurityConfigurerAdapter {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment