mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【功能优化】websocket 允许不传递 token 连接
This commit is contained in:
parent
c71182dda9
commit
01660355cc
@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.mq.redis.core.RedisMQTemplate;
|
|||||||
import cn.iocoder.yudao.framework.websocket.core.handler.JsonWebSocketMessageHandler;
|
import cn.iocoder.yudao.framework.websocket.core.handler.JsonWebSocketMessageHandler;
|
||||||
import cn.iocoder.yudao.framework.websocket.core.listener.WebSocketMessageListener;
|
import cn.iocoder.yudao.framework.websocket.core.listener.WebSocketMessageListener;
|
||||||
import cn.iocoder.yudao.framework.websocket.core.security.LoginUserHandshakeInterceptor;
|
import cn.iocoder.yudao.framework.websocket.core.security.LoginUserHandshakeInterceptor;
|
||||||
|
import cn.iocoder.yudao.framework.websocket.core.security.WebSocketAuthorizeRequestsCustomizer;
|
||||||
import cn.iocoder.yudao.framework.websocket.core.sender.kafka.KafkaWebSocketMessageConsumer;
|
import cn.iocoder.yudao.framework.websocket.core.sender.kafka.KafkaWebSocketMessageConsumer;
|
||||||
import cn.iocoder.yudao.framework.websocket.core.sender.kafka.KafkaWebSocketMessageSender;
|
import cn.iocoder.yudao.framework.websocket.core.sender.kafka.KafkaWebSocketMessageSender;
|
||||||
import cn.iocoder.yudao.framework.websocket.core.sender.local.LocalWebSocketMessageSender;
|
import cn.iocoder.yudao.framework.websocket.core.sender.local.LocalWebSocketMessageSender;
|
||||||
@ -76,6 +77,11 @@ public class YudaoWebSocketAutoConfiguration {
|
|||||||
return new WebSocketSessionManagerImpl();
|
return new WebSocketSessionManagerImpl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public WebSocketAuthorizeRequestsCustomizer webSocketAuthorizeRequestsCustomizer(WebSocketProperties webSocketProperties) {
|
||||||
|
return new WebSocketAuthorizeRequestsCustomizer(webSocketProperties);
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== Sender 相关 ====================
|
// ==================== Sender 相关 ====================
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user