change format of device scope

This commit is contained in:
Amalka Subasinghe 2023-04-21 22:36:45 +05:30
parent 3b7544770d
commit 290dcf61ae

View File

@ -826,7 +826,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
deviceConfig.setClientId(dcrResponse.getClientId());
deviceConfig.setClientSecret(dcrResponse.getClientSecret());
StringBuilder scopes = new StringBuilder("device_" + type.replace(" ", "") + "_" + id);
StringBuilder scopes = new StringBuilder("device:" + type.replace(" ", "") + ":" + id);
for (String topic : mqttEventTopicStructure) {
if (topic.contains("${deviceId}")) {
topic = topic.replace("${deviceId}", id);