Class ServerConfig
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.server.apps.security.ServerConfig
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
@EnableWebSecurity
public class ServerConfig
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Performs a web server configuration for tomcat.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate de.iip_ecosphere.platform.support.aas.AuthenticationDescriptorprivate org.springframework.web.servlet.HandlerInterceptorImplements the authentication interceptor.private static ThreadLocal<Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) static ObjectReturns the security principal determined by the authentication interceptor.org.springframework.boot.web.servlet.server.ServletWebServerFactoryservletContainer(SSLConnectorCustomizer sslConnectorCustomizer) Creates the servlet web server factory.org.springframework.security.core.userdetails.UserDetailsServiceProvides the user details service.org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizerProvides the web security customizer, in particular helpful for debugging.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Field Details
-
principal
-
authDesc
@Autowired(required=false) private de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc -
authInterceptor
private org.springframework.web.servlet.HandlerInterceptor authInterceptorImplements the authentication interceptor.
-
-
Constructor Details
-
ServerConfig
public ServerConfig()
-
-
Method Details
-
getPrincipal
Returns the security principal determined by the authentication interceptor.- Returns:
- the principal, may be null
-
servletContainer
@Bean public org.springframework.boot.web.servlet.server.ServletWebServerFactory servletContainer(SSLConnectorCustomizer sslConnectorCustomizer) Creates the servlet web server factory.- Parameters:
sslConnectorCustomizer- the connector customizer- Returns:
- the factory instance
-
addInterceptors
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) - Specified by:
addInterceptorsin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
userDetailsService
@Bean public org.springframework.security.core.userdetails.UserDetailsService userDetailsService()Provides the user details service.- Returns:
- the user details service
-
webSecurityCustomizer
@Bean public org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer webSecurityCustomizer()Provides the web security customizer, in particular helpful for debugging.- Returns:
- the customizer
-