Class AbstractSecurityWebSocketMessageBrokerConfigurer
java.lang.Object
org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
- All Implemented Interfaces:
- org.springframework.beans.factory.SmartInitializingSingleton,- org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
@Order(-2147483548)
@Import(ObjectPostProcessorConfiguration.class)
@Deprecated
public abstract class AbstractSecurityWebSocketMessageBrokerConfigurer
extends Object
implements org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer, org.springframework.beans.factory.SmartInitializingSingleton
Deprecated.
Allows configuring WebSocket Authorization.
 
For example:
 @Configuration
 public class WebSocketSecurityConfig extends
                AbstractSecurityWebSocketMessageBrokerConfigurer {
        @Override
        protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
                messages.simpDestMatchers("/user/queue/errors").permitAll()
                                .simpDestMatchers("/admin/**").hasRole("ADMIN").anyMessage()
                                .authenticated();
        }
 }
 - Since:
- 4.0
- See Also:
- 
- WebSocketMessageBrokerSecurityConfiguration
 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddArgumentResolvers(List<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> argumentResolvers) Deprecated.voidDeprecated.final voidconfigureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) Deprecated.protected voidDeprecated.Deprecated.protected voidcustomizeClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) Deprecated.Allows subclasses to customize the configuration of theChannelRegistration.inboundChannelSecurity(MessageSecurityMetadataSource messageSecurityMetadataSource) Deprecated.Deprecated.voidregisterStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) Deprecated.protected booleanDeprecated.Determines if a CSRF token is required for connecting.Deprecated.voidsetApplicationContext(org.springframework.context.ApplicationContext context) Deprecated.voidsetMessageExpessionHandler(List<SecurityExpressionHandler<org.springframework.messaging.Message<Object>>> expressionHandlers) Deprecated.voidsetMessageExpressionHandler(List<SecurityExpressionHandler<org.springframework.messaging.Message<Object>>> expressionHandlers) Deprecated.voidsetObjectPostProcessor(ObjectPostProcessor<Object> objectPostProcessor) Deprecated.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigureraddReturnValueHandlers, configureClientOutboundChannel, configureMessageBroker, configureMessageConverters, configureWebSocketTransport, getPhase
- 
Constructor Details- 
AbstractSecurityWebSocketMessageBrokerConfigurerpublic AbstractSecurityWebSocketMessageBrokerConfigurer()Deprecated.
 
- 
- 
Method Details- 
registerStompEndpointspublic void registerStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) Deprecated.- Specified by:
- registerStompEndpointsin interface- org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
 
- 
addArgumentResolverspublic void addArgumentResolvers(List<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> argumentResolvers) Deprecated.- Specified by:
- addArgumentResolversin interface- org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
 
- 
configureClientInboundChannelpublic final void configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) Deprecated.- Specified by:
- configureClientInboundChannelin interface- org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
 
- 
sameOriginDisabledprotected boolean sameOriginDisabled()Deprecated.Determines if a CSRF token is required for connecting. This protects against remote sites from connecting to the application and being able to read/write data over the connection. The default is false (the token is required). Subclasses can override this method to disable CSRF protection - Returns:
- false if a CSRF token is required for connecting, else true
 
- 
customizeClientInboundChannelprotected void customizeClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) Deprecated.Allows subclasses to customize the configuration of theChannelRegistration.- Parameters:
- registration- the- ChannelRegistrationto customize
 
- 
csrfChannelInterceptorDeprecated.
- 
inboundChannelSecurity@Bean public ChannelSecurityInterceptor inboundChannelSecurity(MessageSecurityMetadataSource messageSecurityMetadataSource) Deprecated.
- 
securityContextChannelInterceptorDeprecated.
- 
inboundMessageSecurityMetadataSourceDeprecated.
- 
configureInboundDeprecated.- Parameters:
- messages-
 
- 
setApplicationContext@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext context) Deprecated.
- 
setMessageExpessionHandler@Deprecated public void setMessageExpessionHandler(List<SecurityExpressionHandler<org.springframework.messaging.Message<Object>>> expressionHandlers) Deprecated.
- 
setMessageExpressionHandler@Autowired(required=false) public void setMessageExpressionHandler(List<SecurityExpressionHandler<org.springframework.messaging.Message<Object>>> expressionHandlers) Deprecated.
- 
setObjectPostProcessor@Autowired(required=false) public void setObjectPostProcessor(ObjectPostProcessor<Object> objectPostProcessor) Deprecated.
- 
afterSingletonsInstantiatedpublic void afterSingletonsInstantiated()Deprecated.- Specified by:
- afterSingletonsInstantiatedin interface- org.springframework.beans.factory.SmartInitializingSingleton
 
 
- 
EnableWebSocketSecurityinstead