Class SecurityConfig
java.lang.Object
org.odpi.openmetadata.userauthn.auth.SecurityConfig
Configuration of HttpSecurity for Spring security.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.authentication.AuthenticationManager
authManager
(org.springframework.security.authentication.AuthenticationProvider authProvider) Return the authentication manager.org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Returns WebMvcConfigurer for the cors configuration.com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext>
Get the jwk source.org.springframework.security.web.SecurityFilterChain
securityFilterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) Define the types of URLs that will be permitted to be called without security.
-
Constructor Details
-
SecurityConfig
public SecurityConfig()
-
-
Method Details
-
authManager
@Bean public org.springframework.security.authentication.AuthenticationManager authManager(org.springframework.security.authentication.AuthenticationProvider authProvider) Return the authentication manager.- Parameters:
authProvider
- details of the expected provider- Returns:
- manager
-
jwkSource
@Bean public com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> jwkSource()Get the jwk source.- Returns:
- source
-
corsConfigurer
@Bean @ConditionalOnProperty("cors.allowed-origins") public org.springframework.web.servlet.config.annotation.WebMvcConfigurer corsConfigurer()Returns WebMvcConfigurer for the cors configuration. The bean is based on springboot configuration property cors.allowed-origins- Returns:
- corsConfigurer
-
securityFilterChain
@Bean public org.springframework.security.web.SecurityFilterChain securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) throws Exception Define the types of URLs that will be permitted to be called without security.- Parameters:
httpSecurity
- security object to configure- Returns:
- configured HTTP security object
- Throws:
Exception
- something went wrong
-