Pārlūkot izejas kodu

add coap网络组件

18339543638 4 gadi atpakaļ
vecāks
revīzija
78ed383e01

+ 1 - 6
jetlinks-components/network-component/network-core/src/main/java/org/jetlinks/community/support/MqttDefaultAuth.java

@@ -37,11 +37,6 @@ public class MqttDefaultAuth extends JetLinksAuthenticator {
 
             try {
                 return deviceOperation
-                    .getProduct()
-                    .flatMap(deviceProductOperator -> deviceProductOperator.getProtocol()
-                        .flatMap(protocolSupport -> protocolSupport.authenticate(request,deviceOperation)))
-                    .switchIfEmpty(Mono.error(()->new DeviceOperationException(UNSUPPORTED_MESSAGE)))
-                    .flatMap(ignore->deviceOperation
                         .getConfigs("secureId", "secureKey")
                         .map(conf -> {
                             String secureId = conf.getValue("secureId").map(Value::asString).orElse(null);
@@ -57,7 +52,7 @@ public class MqttDefaultAuth extends JetLinksAuthenticator {
                             } else {
                                 return AuthenticationResponse.error(401, "密钥错误");
                             }
-                        }));
+                        });
             } catch (NumberFormatException e) {
                 return Mono.just(AuthenticationResponse.error(401, "用户名格式错误"));
             }