From affbd0079603fb46cfd68e861849bf1b46a61de8 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 20 Jan 2017 17:05:41 +0530 Subject: [PATCH] arduino fix is added --- .../device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java index 7b903a5a6..b5c6b10d9 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java @@ -230,7 +230,7 @@ public class ArduinoServiceImpl implements ArduinoService { ArduinoConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); - String scopes = " device_" + deviceId; + String scopes = " device_" + deviceId + " perm:arduino:enroll"; AccessTokenInfo accessTokenInfo = jwtClient.getAccessToken(apiApplicationKey.getConsumerKey(), apiApplicationKey.getConsumerSecret(), owner, scopes); //create token