クラス AbstractSecurityWebSocketMessageBrokerConfigurer

java.lang.ObjectSE
org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
実装されたすべてのインターフェース:
org.springframework.beans.factory.SmartInitializingSingletonorg.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
使用すべきではありません。
代わりに EnableWebSocketSecurity を使用してください
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
  • コンストラクターの詳細

    • AbstractSecurityWebSocketMessageBrokerConfigurer

      public AbstractSecurityWebSocketMessageBrokerConfigurer()
      使用すべきではありません。
  • メソッドの詳細

    • registerStompEndpoints

      public void registerStompEndpoints(org.springframework.web.socket.config.annotation.StompEndpointRegistry registry)
      使用すべきではありません。
      次で指定:
      インターフェース org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurerregisterStompEndpoints 
    • addArgumentResolvers

      public void addArgumentResolvers(ListSE<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> argumentResolvers)
      使用すべきではありません。
      次で指定:
      インターフェース org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigureraddArgumentResolvers 
    • configureClientInboundChannel

      public final void configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration)
      使用すべきではありません。
      次で指定:
      インターフェース org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurerconfigureClientInboundChannel 
    • 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

      @Bean public CsrfChannelInterceptor csrfChannelInterceptor()
      使用すべきではありません。
    • inboundChannelSecurity

      @Bean public ChannelSecurityInterceptor inboundChannelSecurity(MessageSecurityMetadataSource messageSecurityMetadataSource)
      使用すべきではありません。
    • securityContextChannelInterceptor

      @Bean public SecurityContextChannelInterceptor securityContextChannelInterceptor()
      使用すべきではありません。
    • inboundMessageSecurityMetadataSource

      @Bean public MessageSecurityMetadataSource inboundMessageSecurityMetadataSource()
      使用すべきではありません。
    • configureInbound

      protected void configureInbound(MessageSecurityMetadataSourceRegistry messages)
      使用すべきではありません。
      パラメーター:
      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.SmartInitializingSingletonafterSingletonsInstantiated