diff --git a/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java index 162048b6c..a4012f4ff 100644 --- a/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java +++ b/components/extensions/cdmf-transport-adapters/input/io.entgra.device.mgt.plugins.input.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/input/adapter/mqtt/util/MQTTAdapterListener.java @@ -136,7 +136,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { String applicationName = MQTTEventAdapterConstants.APPLICATION_NAME_PREFIX + mqttBrokerConnectionConfiguration.getAdapterName(); DCRResponse dcrResponse = keyMgtService.dynamicClientRegistration(applicationName, username, - "client_credentials", null, new String[]{"device_management"}, false, Integer.MAX_VALUE); + "client_credentials", null, new String[]{"device_management"}, false, Integer.MAX_VALUE, password); String accessToken = getToken(dcrResponse.getClientId(), dcrResponse.getClientSecret()); connectionOptions.setUserName(accessToken.substring(0, 18)); connectionOptions.setPassword(accessToken.substring(19).toCharArray()); diff --git a/components/extensions/cdmf-transport-adapters/output/io.entgra.device.mgt.plugins.output.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/output/adapter/mqtt/util/MQTTAdapterPublisher.java b/components/extensions/cdmf-transport-adapters/output/io.entgra.device.mgt.plugins.output.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/output/adapter/mqtt/util/MQTTAdapterPublisher.java index a6f930877..f4f5119b9 100644 --- a/components/extensions/cdmf-transport-adapters/output/io.entgra.device.mgt.plugins.output.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/output/adapter/mqtt/util/MQTTAdapterPublisher.java +++ b/components/extensions/cdmf-transport-adapters/output/io.entgra.device.mgt.plugins.output.adapter.mqtt/src/main/java/io/entgra/device/mgt/plugins/output/adapter/mqtt/util/MQTTAdapterPublisher.java @@ -158,7 +158,7 @@ public class MQTTAdapterPublisher { String applicationName = MQTTEventAdapterConstants.APPLICATION_NAME_PREFIX + mqttBrokerConnectionConfiguration.getAdapterName(); DCRResponse dcrResponse = keyMgtService.dynamicClientRegistration(applicationName, username, - "client_credentials", null, new String[]{"device_management"}, false, Integer.MAX_VALUE); + "client_credentials", null, new String[]{"device_management"}, false, Integer.MAX_VALUE, password); return getToken(dcrResponse.getClientId(), dcrResponse.getClientSecret()); // connectionOptions.setUserName(accessToken.substring(0, 18)); // connectionOptions.setPassword(accessToken.substring(19).toCharArray());