From 931fb8ef54b61975e031e4198e310c4a1fd09bc1 Mon Sep 17 00:00:00 2001 From: Pahansith Date: Wed, 16 Dec 2020 21:16:38 +0530 Subject: [PATCH] Add windows agent token generation parameters to config API --- .../wso2/carbon/device/mgt/core/DeviceManagementConstants.java | 2 +- .../org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java index 41b96665e6e..df5f030684d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java @@ -50,7 +50,7 @@ public final class DeviceManagementConstants { private ConfigurationManagement(){ throw new AssertionError(); } - public static final String SCOPES_FOR_TOKEN = "perm:device:operations perm:device:publish-event"; + public static final String SCOPES_FOR_TOKEN = "perm:device:operations perm:device:publish-event perm:windows:enroll"; public static final String IOT_GATEWAY_HOST = "iot.gateway.host"; public static final String IOT_GATEWAY_HTTPS_PORT = "iot.gateway.https.port"; public static final String APPLICATION_REGISTRATION_API_ENDPOINT = diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java index 95d68727e78..78227542086 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java @@ -812,6 +812,7 @@ public final class DeviceManagerUtil { applicationRegistration.setApplicationName("MyApp"); applicationRegistration.setAllowedToAllDomains(false); List tags = new ArrayList<>(); + tags.add("windows"); tags.add("device_management"); applicationRegistration.setTags(tags); applicationRegistration.setValidityPeriod(3600);