Deleting authentication
-package greencity.config;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.messaging.Message;
-import org.springframework.messaging.MessageChannel;
-import org.springframework.messaging.simp.config.ChannelRegistration;
-import org.springframework.messaging.simp.stomp.StompCommand;
-import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
-import org.springframework.messaging.support.ChannelInterceptor;
-import org.springframework.messaging.support.MessageHeaderAccessor;
-import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
-import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
-
-import java.util.List;
-
-@Configuration
-@EnableWebSocketMessageBroker
-public class WebSocketAuthenticationConfig implements WebSocketMessageBrokerConfigurer {
- private static final Logger logger = LoggerFactory.getLogger(WebSocketAuthenticationConfig.class);
-
- @Override
- public void configureClientInboundChannel(ChannelRegistration registration) {
- registration.interceptors(new ChannelInterceptor() {
- @Override
- public Message<?> preSend(Message<?> message, MessageChannel channel) {
- StompHeaderAccessor accessor =
- MessageHeaderAccessor.getAccessor(message, StompHeaderAccessor.class);
- if (StompCommand.CONNECT.equals(accessor.getCommand())) {
- List<String> authorization = accessor.getNativeHeader("X-Authorization");
- logger.debug("X-Authorization: {}", authorization);
- }
- return message;
- }
- });
- }
-}
+//package greencity.config;
+//
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.messaging.Message;
+//import org.springframework.messaging.MessageChannel;
+//import org.springframework.messaging.simp.config.ChannelRegistration;
+//import org.springframework.messaging.simp.stomp.StompCommand;
+//import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
+//import org.springframework.messaging.support.ChannelInterceptor;
+//import org.springframework.messaging.support.MessageHeaderAccessor;
+//import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
+//import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
+//
+//import java.util.List;
+//
+//@Configuration
+//@EnableWebSocketMessageBroker
+//public class WebSocketAuthenticationConfig implements WebSocketMessageBrokerConfigurer {
+// private static final Logger logger = LoggerFactory.getLogger(WebSocketAuthenticationConfig.class);
+//
+// @Override
+// public void configureClientInboundChannel(ChannelRegistration registration) {
+// registration.interceptors(new ChannelInterceptor() {
+// @Override
+// public Message<?> preSend(Message<?> message, MessageChannel channel) {
+// StompHeaderAccessor accessor =
+// MessageHeaderAccessor.getAccessor(message, StompHeaderAccessor.class);
+// if (StompCommand.CONNECT.equals(accessor.getCommand())) {
+// List<String> authorization = accessor.getNativeHeader("X-Authorization");
+// logger.debug("X-Authorization: {}", authorization);
+// }
+// return message;
+// }
+// });
+// }
+//}
