From dd7910268e685611498eb2def19083383686bfc3 Mon Sep 17 00:00:00 2001 From: osh Date: Mon, 17 Jul 2023 13:36:39 +0530 Subject: [PATCH] Add vpp token field --- .../mgt/core/application/mgt/common/DepConfig.java | 9 +++++++++ .../core/dao/impl/vpp/GenericVppApplicationDAOImpl.java | 2 +- .../mgt/core/impl/VppApplicationManagerImpl.java | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/src/main/java/io/entgra/device/mgt/core/application/mgt/common/DepConfig.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/src/main/java/io/entgra/device/mgt/core/application/mgt/common/DepConfig.java index 712ad11df2..244f88fb08 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/src/main/java/io/entgra/device/mgt/core/application/mgt/common/DepConfig.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.common/src/main/java/io/entgra/device/mgt/core/application/mgt/common/DepConfig.java @@ -26,6 +26,7 @@ public class DepConfig { private String accessToken; private String accessSecret; private String accessTokenExpiry; + private String vppToken; public String getAgentPackageName() { return agentPackageName; @@ -59,6 +60,14 @@ public class DepConfig { this.accessToken = accessToken; } + public String getVppToken() { + return vppToken; + } + + public void setVppToken(String vppToken) { + this.vppToken = vppToken; + } + public String getAccessSecret() { return accessSecret; } diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/vpp/GenericVppApplicationDAOImpl.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/vpp/GenericVppApplicationDAOImpl.java index df29a3f4b7..38fa090f94 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/vpp/GenericVppApplicationDAOImpl.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/vpp/GenericVppApplicationDAOImpl.java @@ -174,7 +174,7 @@ public class GenericVppApplicationDAOImpl extends AbstractDAOImpl implements Vp + "CREATED_TIME, " + "LAST_UPDATED_TIME, " + "MANAGED_ID, " - + "TEMP_PASSWORD " + + "TEMP_PASSWORD, " + "DM_USERNAME " + "FROM AP_VPP_USER " + "WHERE DM_USERNAME = ? AND TENANT_ID = ?"; diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/VppApplicationManagerImpl.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/VppApplicationManagerImpl.java index 8ab98ad5a5..dc9b34e40d 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/VppApplicationManagerImpl.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/VppApplicationManagerImpl.java @@ -591,7 +591,7 @@ public class VppApplicationManagerImpl implements VPPApplicationManager { Gson g = new Gson(); DepConfig depConfigs = g.fromJson(metadata.getMetaValue(), DepConfig.class); - token = depConfigs.getAccessToken(); + token = depConfigs.getVppToken(); return token; } }catch (MetadataManagementException e) {