Class WebSocketSecurityConfig
java.lang.Object
org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer
org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
org.qubership.atp.auth.springbootstarter.config.WebSocketSecurityConfig
- All Implemented Interfaces:
org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
@Configuration
@Profile("default")
public class WebSocketSecurityConfig
extends org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureInbound(org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry messages) org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptorinboundChannelSecurity(org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource messageSecurityMetadataSource) Create ChannelSecurityInterceptor with custom authentication manager.protected org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProviderprotected booleanMethods inherited from class org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
addArgumentResolvers, afterSingletonsInstantiated, configureClientInboundChannel, csrfChannelInterceptor, customizeClientInboundChannel, inboundMessageSecurityMetadataSource, registerStompEndpoints, securityContextChannelInterceptor, setApplicationContext, setMessageExpessionHandler, setMessageExpressionHandler, setObjectPostProcessorMethods inherited from class org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer
addReturnValueHandlers, configureClientOutboundChannel, configureMessageBroker, configureMessageConverters, configureWebSocketTransport
-
Constructor Details
-
WebSocketSecurityConfig
public WebSocketSecurityConfig()
-
-
Method Details
-
configureInbound
protected void configureInbound(org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry messages) - Overrides:
configureInboundin classorg.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
-
inboundChannelSecurity
@Bean public org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptor inboundChannelSecurity(org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource messageSecurityMetadataSource) Create ChannelSecurityInterceptor with custom authentication manager.- Overrides:
inboundChannelSecurityin classorg.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer- Parameters:
messageSecurityMetadataSource- the messageSecurityMetadataSource- Returns:
- ChannelSecurityInterceptor
-
keycloakAuthenticationProvider
protected org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider keycloakAuthenticationProvider() -
sameOriginDisabled
protected boolean sameOriginDisabled()- Overrides:
sameOriginDisabledin classorg.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
-