防止踩踏连接并返回HttpStatus 401

时间:2018-07-12 12:30:52

标签: java spring spring-boot stomp http-status

我正在使用ChannelInterceptorAdapter的实现。

我有以下方法:

    public Message<?> preSend(Message<?> message, MessageChannel channel) throws AuthenticationException {
            //...
    }

我对StompCommand.CONNECT做出反应并检查会话标头。如果他们不能满足我的需求,我想取消用户Connect的尝试,并返回HTTPStatus 401。

有人可以帮我吗?预先感谢

致谢

0 个答案:

没有答案