JAVA-27656 | removing WebSecurityConfigurerAdapter
This commit is contained in:
parent
8dd4651db5
commit
4151b9ce70
|
@ -1,19 +1,23 @@
|
|||
package com.baeldung.cloud.openfeign.oauthfeign;
|
||||
|
||||
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.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
||||
@Configuration
|
||||
public class OAuth2WebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
|
||||
public class OAuth2WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
http
|
||||
.csrf()
|
||||
.disable()
|
||||
.oauth2Client();
|
||||
|
||||
http
|
||||
.authorizeRequests().anyRequest().permitAll();
|
||||
|
||||
return http.build();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue