Skip to content

Commit

Permalink
Merge pull request #192 from bci-oss/feature/veracode-CWE_ID_352
Browse files Browse the repository at this point in the history
feat:corrected deprecated usages
  • Loading branch information
tunacicek authored Dec 1, 2023
2 parents 486c3a2 + d1a6098 commit 9141ab5
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.CsrfConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;

Expand Down Expand Up @@ -65,11 +66,10 @@ protected SecurityFilterChain configure(HttpSecurity http) throws Exception {
.requestMatchers( HttpMethod.PUT, "/**/lookup/**" ).access( "@authorizationEvaluator.hasRoleUpdateDigitalTwin()" )
.requestMatchers( HttpMethod.DELETE, "/**/lookup/**" ).access( "@authorizationEvaluator.hasRoleDeleteDigitalTwin()" )
)
.csrf().disable()
.sessionManagement().sessionCreationPolicy( SessionCreationPolicy.STATELESS )
.and()
.oauth2ResourceServer()
.jwt();
.csrf(CsrfConfigurer::disable)
.sessionManagement(sessionManagement -> sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.oauth2ResourceServer(oauth2ResourceServerConfigurer -> oauth2ResourceServerConfigurer.jwt());

return http.build();
}

Expand Down

0 comments on commit 9141ab5

Please sign in to comment.