クラス AbstractSecurityWebSocketMessageBrokerConfigurer
java.lang.ObjectSE
org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
- 実装されたすべてのインターフェース:
org.springframework.beans.factory.SmartInitializingSingleton
,org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
@Order(-2147483548)
@Import(ObjectPostProcessorConfiguration.class)
@DeprecatedSE
public abstract class AbstractSecurityWebSocketMessageBrokerConfigurer
extends ObjectSE
implements org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer, org.springframework.beans.factory.SmartInitializingSingleton
使用すべきではありません。
WebSocket 認証を設定できます。
例:
@Configuration public class WebSocketSecurityConfig extends AbstractSecurityWebSocketMessageBrokerConfigurer { @Override protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) { messages.simpDestMatchers("/user/queue/errors").permitAll() .simpDestMatchers("/admin/**").hasRole("ADMIN").anyMessage() .authenticated(); } }
- 導入:
- 4.0
- 関連事項:
WebSocketMessageBrokerSecurityConfiguration
コンストラクターのサマリー
メソッドのサマリー
修飾子と型メソッド説明void
addArgumentResolvers
(ListSE<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> argumentResolvers) 使用すべきではありません。void
使用すべきではありません。final void
configureClientInboundChannel
(org.springframework.messaging.simp.config.ChannelRegistration registration) 使用すべきではありません。protected void
使用すべきではありません。使用すべきではありません。protected void
customizeClientInboundChannel
(org.springframework.messaging.simp.config.ChannelRegistration registration) 使用すべきではありません。サブクラスがChannelRegistration
の構成をカスタマイズできるようにします。inboundChannelSecurity
(MessageSecurityMetadataSource messageSecurityMetadataSource) 使用すべきではありません。使用すべきではありません。void
registerStompEndpoints
(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) 使用すべきではありません。protected boolean
使用すべきではありません。接続に CSRF トークンが必要かどうかを決定します。使用すべきではありません。void
setApplicationContext
(org.springframework.context.ApplicationContext context) 使用すべきではありません。void
setMessageExpessionHandler
(ListSE<SecurityExpressionHandler<org.springframework.messaging.Message<ObjectSE>>> expressionHandlers) 使用すべきではありません。void
setMessageExpressionHandler
(ListSE<SecurityExpressionHandler<org.springframework.messaging.Message<ObjectSE>>> expressionHandlers) 使用すべきではありません。void
setObjectPostProcessor
(ObjectPostProcessor<ObjectSE> objectPostProcessor) 使用すべきではありません。クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer から継承されたメソッド
addReturnValueHandlers, configureClientOutboundChannel, configureMessageBroker, configureMessageConverters, configureWebSocketTransport, getPhase
コンストラクターの詳細
AbstractSecurityWebSocketMessageBrokerConfigurer
public AbstractSecurityWebSocketMessageBrokerConfigurer()使用すべきではありません。
メソッドの詳細
registerStompEndpoints
public void registerStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry) 使用すべきではありません。- 次で指定:
- インターフェース
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
のregisterStompEndpoints
addArgumentResolvers
public void addArgumentResolvers(ListSE<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> argumentResolvers) 使用すべきではありません。- 次で指定:
- インターフェース
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
のaddArgumentResolvers
configureClientInboundChannel
public final void configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) 使用すべきではありません。- 次で指定:
- インターフェース
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
のconfigureClientInboundChannel
sameOriginDisabled
protected boolean sameOriginDisabled()使用すべきではありません。接続に CSRF トークンが必要かどうかを決定します。これにより、リモートサイトがアプリケーションに接続し、接続を介してデータを読み書きできるようになります。デフォルトは false です(トークンは必須です)。
サブクラスはこのメソッドをオーバーライドして CSRF 保護を無効にすることができます
- 戻り値:
- 接続に CSRF トークンが必要な場合は false、それ以外の場合は true
customizeClientInboundChannel
protected void customizeClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration) 使用すべきではありません。サブクラスがChannelRegistration
の構成をカスタマイズできるようにします。- パラメーター:
registration
-ChannelRegistration
をカスタマイズする
csrfChannelInterceptor
使用すべきではありません。inboundChannelSecurity
@Bean public ChannelSecurityInterceptor inboundChannelSecurity(MessageSecurityMetadataSource messageSecurityMetadataSource) 使用すべきではありません。securityContextChannelInterceptor
使用すべきではありません。inboundMessageSecurityMetadataSource
使用すべきではありません。configureInbound
使用すべきではありません。- パラメーター:
messages
-
setApplicationContext
@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext context) 使用すべきではありません。setMessageExpessionHandler
@DeprecatedSE public void setMessageExpessionHandler(ListSE<SecurityExpressionHandler<org.springframework.messaging.Message<ObjectSE>>> expressionHandlers) 使用すべきではありません。setMessageExpressionHandler
@Autowired(required=false) public void setMessageExpressionHandler(ListSE<SecurityExpressionHandler<org.springframework.messaging.Message<ObjectSE>>> expressionHandlers) 使用すべきではありません。setObjectPostProcessor
@Autowired(required=false) public void setObjectPostProcessor(ObjectPostProcessor<ObjectSE> objectPostProcessor) 使用すべきではありません。afterSingletonsInstantiated
public void afterSingletonsInstantiated()使用すべきではありません。- 次で指定:
- インターフェース
org.springframework.beans.factory.SmartInitializingSingleton
のafterSingletonsInstantiated
EnableWebSocketSecurity
を使用してください