|
|
@ -27,10 +27,11 @@
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
* under the License.
|
|
|
|
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
var androidOperationModule = function () {
|
|
|
|
var androidOperationModule = function () {
|
|
|
@ -51,6 +52,7 @@ var androidOperationModule = function () {
|
|
|
|
"CAMERA_OPERATION_CODE": "CAMERA",
|
|
|
|
"CAMERA_OPERATION_CODE": "CAMERA",
|
|
|
|
"ENCRYPT_STORAGE_OPERATION_CODE": "ENCRYPT_STORAGE",
|
|
|
|
"ENCRYPT_STORAGE_OPERATION_CODE": "ENCRYPT_STORAGE",
|
|
|
|
"WIFI_OPERATION_CODE": "WIFI",
|
|
|
|
"WIFI_OPERATION_CODE": "WIFI",
|
|
|
|
|
|
|
|
"GLOBAL_PROXY_OPERATION_CODE": "GLOBAL_PROXY",
|
|
|
|
"WIPE_OPERATION_CODE": "WIPE_DATA",
|
|
|
|
"WIPE_OPERATION_CODE": "WIPE_DATA",
|
|
|
|
"NOTIFICATION_OPERATION_CODE": "NOTIFICATION",
|
|
|
|
"NOTIFICATION_OPERATION_CODE": "NOTIFICATION",
|
|
|
|
"WORK_PROFILE_CODE": "WORK_PROFILE",
|
|
|
|
"WORK_PROFILE_CODE": "WORK_PROFILE",
|
|
|
@ -153,6 +155,15 @@ var androidOperationModule = function () {
|
|
|
|
"wifiCaCertName": operationPayload["cacertName"]
|
|
|
|
"wifiCaCertName": operationPayload["cacertName"]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case androidOperationConstants["GLOBAL_PROXY_OPERATION_CODE"]:
|
|
|
|
|
|
|
|
payload = {
|
|
|
|
|
|
|
|
"proxyHost": operationPayload["proxyHost"],
|
|
|
|
|
|
|
|
"proxyPort": operationPayload["proxyPort"],
|
|
|
|
|
|
|
|
"proxyExclList": operationPayload["proxyExclList"],
|
|
|
|
|
|
|
|
"proxyUsername": operationPayload["proxyUsername"],
|
|
|
|
|
|
|
|
"proxyPassword": operationPayload["proxyPassword"]
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
break;
|
|
|
|
case androidOperationConstants["VPN_OPERATION_CODE"]:
|
|
|
|
case androidOperationConstants["VPN_OPERATION_CODE"]:
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
|
"serverAddress": operationPayload["serverAddress"],
|
|
|
|
"serverAddress": operationPayload["serverAddress"],
|
|
|
@ -310,6 +321,22 @@ var androidOperationModule = function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case androidOperationConstants["GLOBAL_PROXY_OPERATION_CODE"]:
|
|
|
|
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
|
|
|
|
var proxyExclList = [];
|
|
|
|
|
|
|
|
if (operationData["proxyExclList"]) {
|
|
|
|
|
|
|
|
proxyExclList = operationData["proxyExclList"].trim().split(/\s*,\s*/);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
payload = {
|
|
|
|
|
|
|
|
"operation": {
|
|
|
|
|
|
|
|
"proxyHost": operationData["proxyHost"],
|
|
|
|
|
|
|
|
"proxyPort": operationData["proxyPort"],
|
|
|
|
|
|
|
|
"proxyExclList": proxyExclList,
|
|
|
|
|
|
|
|
"proxyUsername": operationData["proxyUsername"],
|
|
|
|
|
|
|
|
"proxyPassword": operationData["proxyPassword"]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
break;
|
|
|
|
case androidOperationConstants["VPN_OPERATION_CODE"]:
|
|
|
|
case androidOperationConstants["VPN_OPERATION_CODE"]:
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
operationType = operationTypeConstants["PROFILE"];
|
|
|
|
payload = {
|
|
|
|
payload = {
|
|
|
@ -433,6 +460,7 @@ var androidOperationModule = function () {
|
|
|
|
publicMethods.getAndroidServiceEndpoint = function (operationCode) {
|
|
|
|
publicMethods.getAndroidServiceEndpoint = function (operationCode) {
|
|
|
|
var featureMap = {
|
|
|
|
var featureMap = {
|
|
|
|
"WIFI": "configure-wifi",
|
|
|
|
"WIFI": "configure-wifi",
|
|
|
|
|
|
|
|
"GLOBAL_PROXY": "set-global-proxy",
|
|
|
|
"CAMERA": "control-camera",
|
|
|
|
"CAMERA": "control-camera",
|
|
|
|
"VPN": "configure-vpn",
|
|
|
|
"VPN": "configure-vpn",
|
|
|
|
"DEVICE_LOCK": "lock-devices",
|
|
|
|
"DEVICE_LOCK": "lock-devices",
|
|
|
@ -455,7 +483,6 @@ var androidOperationModule = function () {
|
|
|
|
"ENTERPRISE_WIPE": "enterprise-wipe",
|
|
|
|
"ENTERPRISE_WIPE": "enterprise-wipe",
|
|
|
|
"WIPE_DATA": "wipe"
|
|
|
|
"WIPE_DATA": "wipe"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
//return "/mdm-android-agent/operation/" + featureMap[operationCode];
|
|
|
|
|
|
|
|
return "/api/device-mgt/android/v1.0/admin/devices/" + featureMap[operationCode];
|
|
|
|
return "/api/device-mgt/android/v1.0/admin/devices/" + featureMap[operationCode];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|