JAVA-18103 Update Code as per review comments

This commit is contained in:
anuragkumawat 2023-02-20 22:33:43 +05:30
parent 47184dc06d
commit 4d03829a98
1 changed files with 0 additions and 8 deletions

View File

@ -3,8 +3,6 @@ package com.baeldung.disablingkeycloak;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
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.oauth2.server.resource.OAuth2ResourceServerConfigurer;
@ -33,10 +31,4 @@ public class KeycloakSecurityConfig {
http.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt);
return http.build();
}
@Bean
public AuthenticationManager authenticationManager(HttpSecurity http) throws Exception {
return http.getSharedObject(AuthenticationManagerBuilder.class)
.build();
}
}