diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/api/user-api.jag b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/api/user-api.jag index b038e66ad5..2a36433ded 100755 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/api/user-api.jag +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/api/user-api.jag @@ -121,9 +121,9 @@ if (uriMatcher.match("/{context}/api/user/authenticate")) { } else { userRoles = String(addUserFormData.userRoles).split(","); } - if (username.length < devicemgtProps.usernameLength) { - log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"); - result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"; + if (username.length < devicemgtProps.userValidationConfig.usernameLength) { + log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long"); + result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long"; } else { try { result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json index 75943b23b9..3c82027057 100755 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/android-web-agent/app/conf/config.json @@ -1,6 +1,5 @@ { "appContext" : "/android-web-agent/", - "apiContext" : "api", "httpsURL" : "%https.ip%", "httpURL" : "%http.ip%", "enrollmentDir": "/android-web-agent/enrollment", @@ -24,7 +23,9 @@ "tokenServiceURL": "%https.ip%/oauth2/token" }, "adminUser":"admin", - "usernameLength":30, + "userValidationConfig" : { + "usernameLength":30 + }, "device" : { "ios" : { "location" : "%http.ip%/android-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa", @@ -35,16 +36,6 @@ }, "androidAgentApp" : "android-agent.apk", "windowsConfigRoot" : "%http.ip%/api/device-mgt/windows/v1.0/services/federated/bst/authentication", - "ssoConfiguration" : { - "enabled" : false, - "issuer" : "mdm", - "appName" : "admin_android-web-agent", - "identityProviderURL" : "%https.ip%/sso/samlsso.jag", - "responseSigningEnabled" : "true", - "keyStorePassword" : "wso2carbon", - "identityAlias" : "wso2carbon", - "keyStoreName" : "/repository/resources/security/wso2carbon.jks" - }, "generalConfig" : { "host" : "%http.ip%", "companyName" : "WSO2 Enterprise Mobility Manager", diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/api/user-api.jag b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/api/user-api.jag index b038e66ad5..2a36433ded 100755 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/api/user-api.jag +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/api/user-api.jag @@ -121,9 +121,9 @@ if (uriMatcher.match("/{context}/api/user/authenticate")) { } else { userRoles = String(addUserFormData.userRoles).split(","); } - if (username.length < devicemgtProps.usernameLength) { - log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"); - result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long"; + if (username.length < devicemgtProps.userValidationConfig.usernameLength) { + log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long"); + result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long"; } else { try { result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles); diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json index d02ddd7404..7e4a733cda 100755 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json @@ -1,6 +1,5 @@ { "appContext" : "/windows-web-agent/", - "apiContext" : "api", "httpsURL" : "%https.ip%", "httpURL" : "%http.ip%", "enrollmentDir": "/windows-web-agent/enrollment", @@ -24,7 +23,9 @@ "tokenServiceURL": "%https.ip%/oauth2/token" }, "adminUser":"admin", - "usernameLength":30, + "userValidationConfig": { + "usernameLength":30 + }, "device" : { "ios" : { "location" : "%http.ip%/windows-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa", @@ -35,16 +36,6 @@ }, "androidAgentApp" : "android-agent.apk", "windowsConfigRoot" : "%http.ip%/api/device-mgt/windows/v1.0/federated/bst/authentication", - "ssoConfiguration" : { - "enabled" : false, - "issuer" : "mdm", - "appName" : "admin_windows-web-agent", - "identityProviderURL" : "%https.ip%/sso/samlsso.jag", - "responseSigningEnabled" : "true", - "keyStorePassword" : "wso2carbon", - "identityAlias" : "wso2carbon", - "keyStoreName" : "/repository/resources/security/wso2carbon.jks" - }, "generalConfig" : { "host" : "%http.ip%", "companyName" : "WSO2 Enterprise Mobility Manager", diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/oauth/token-handlers.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/oauth/token-handlers.js index bff0f143fa..f18f4c2356 100755 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/oauth/token-handlers.js +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/oauth/token-handlers.js @@ -142,7 +142,7 @@ var handlers = function () { "client credentials to session context as the server is unable to obtain " + "dynamic client credentials - setUpEncodedTenantBasedClientAppCredentials(x)"); } else { - if (devicemgtProps["apimgt-gateway"]) { + if (devicemgtProps["gatewayEnabled"]) { var jwtToken = tokenUtil.getAccessTokenByJWTGrantType(dynamicClientAppCredentials); if (!jwtToken) { throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +