diff --git a/app/Http/Controllers/Application/MqttAuthController.php b/app/Http/Controllers/Application/MqttAuthController.php index 1a218e3..da9fcee 100644 --- a/app/Http/Controllers/Application/MqttAuthController.php +++ b/app/Http/Controllers/Application/MqttAuthController.php @@ -103,12 +103,13 @@ public function authorization(Request $request) } } + if (count($usernames) === 1) { // 是模块自己的连接 return $this->allow(); } - // Log::debug('联系模块。'); + // 其他情况,让模块去验证 // 联系模块,让模块去验证设备授权。 $response = $module->baseRequest('post', 'mqtt/authorization', [