mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
changed application creation endpoint
This commit is contained in:
parent
5e6160383c
commit
6e69fc8e84
@ -167,14 +167,14 @@ var utils = function () {
|
||||
|
||||
// register a tenant based app at API Manager
|
||||
var applicationName = "websocket_webapp_" + tenantDomain;
|
||||
var requestURL = deviceMgtProps["oauthProvider"]["appRegistration"]
|
||||
["apiManagerClientAppRegistrationServiceURL"] +
|
||||
"?tenantDomain=" + tenantDomain + "&applicationName=" + applicationName;
|
||||
var requestURL = (deviceMgtProps["oauthProvider"]["appRegistration"]
|
||||
["apiManagerClientAppRegistrationServiceURL"]).replace("/tenants","");
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", requestURL, false);
|
||||
xhr.setRequestHeader("Content-Type", "application/json");
|
||||
xhr.setRequestHeader("X-JWT-Assertion", "" + jwtToken);
|
||||
xhr.send();
|
||||
xhr.send(stringify({applicationName:applicationName, tags:["device_management"],
|
||||
isAllowedToAllDomains:false, isMappingAnExistingOAuthApp:false, validityPeriod: 3600}));
|
||||
if (xhr["status"] == 201 && xhr["responseText"]) {
|
||||
var responsePayload = parse(xhr["responseText"]);
|
||||
var tenantTenantBasedWebsocketClientAppCredentials = {};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user