diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json
index 9322773d37c..4e907782bec 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json
@@ -12,6 +12,7 @@
"iOSConfigRoot" : "%https.ip%/ios-enrollment/",
"iOSAPIRoot" : "%https.ip%/ios/",
"adminService": "%https.ip%",
+ "apimgt-gateway": false,
"oauthProvider": {
"appRegistration": {
"appType": "webapp",
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js
index 8a41429ce65..9fb3198e058 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js
@@ -142,26 +142,35 @@ var handlers = function () {
"client credentials to session context as the server is unable to obtain " +
"dynamic client credentials - setUpEncodedTenantBasedClientAppCredentials(x)");
} else {
- var jwtToken = tokenUtil.getAccessTokenByJWTGrantType(dynamicClientAppCredentials);
- if (!jwtToken) {
- throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
+ if (devicemgtProps["apimgt-gateway"]) {
+ var jwtToken = tokenUtil.getAccessTokenByJWTGrantType(dynamicClientAppCredentials);
+ if (!jwtToken) {
+ throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
"client credentials to session context as the server is unable to obtain " +
- "a jwt token - setUpEncodedTenantBasedClientAppCredentials(x)");
- } else {
- var tenantBasedClientAppCredentials = tokenUtil.
- getTenantBasedClientAppCredentials(username, jwtToken);
- if (!tenantBasedClientAppCredentials) {
- throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant " +
- "based client credentials to session context as the server is unable " +
- "to obtain such credentials - setUpEncodedTenantBasedClientAppCredentials(x)");
+ "a jwt token - setUpEncodedTenantBasedClientAppCredentials(x)");
} else {
- var encodedTenantBasedClientAppCredentials =
- tokenUtil.encode(tenantBasedClientAppCredentials["clientId"] + ":" +
+ var tenantBasedClientAppCredentials = tokenUtil.
+ getTenantBasedClientAppCredentials(username, jwtToken);
+ if (!tenantBasedClientAppCredentials) {
+ throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant " +
+ "based client credentials to session context as the server is unable " +
+ "to obtain such credentials - setUpEncodedTenantBasedClientAppCredentials(x)");
+ } else {
+ var encodedTenantBasedClientAppCredentials =
+ tokenUtil.encode(tenantBasedClientAppCredentials["clientId"] + ":" +
tenantBasedClientAppCredentials["clientSecret"]);
- // setting up encoded tenant based client credentials to session context.
- session.put(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"],
- encodedTenantBasedClientAppCredentials);
+ // setting up encoded tenant based client credentials to session context.
+ session.put(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"],
+ encodedTenantBasedClientAppCredentials);
+ }
}
+ } else {
+ var encodedTenantBasedClientAppCredentials =
+ tokenUtil.encode(dynamicClientAppCredentials["clientId"] + ":" +
+ dynamicClientAppCredentials["clientSecret"]);
+ // setting up encoded tenant based client credentials to session context.
+ session.put(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"],
+ encodedTenantBasedClientAppCredentials);
}
}
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs
index 9c936870be4..586cad7073a 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.hbs
@@ -1,6 +1,4 @@
-{{unit "mdm.unit.lib.leaflet"}}
{{unit "cdmf.unit.lib.qrcode"}}
-{{unit "mdm.unit.device.qr-modal"}}
{{#zone "content"}}
{{#if deviceFound}}
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml
index 8c24f1995ec..fdd4a427103 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml
@@ -53,6 +53,7 @@
1
android
+ ios
@@ -60,6 +61,7 @@
5
android
+ ios
@@ -67,6 +69,7 @@
1
android
+ ios