From f6e1083c7f62ece69588644a0f6fd25b9b92fecc Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 13 Jun 2024 16:07:03 +0100 Subject: [PATCH] amended the secrets --- src/main/java/apiCalls/Utils/generic/BaseAPI.java | 12 +++--------- src/main/java/apiCalls/actions/UserDetails.java | 1 - 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/apiCalls/Utils/generic/BaseAPI.java b/src/main/java/apiCalls/Utils/generic/BaseAPI.java index 90f477b..bdfa207 100644 --- a/src/main/java/apiCalls/Utils/generic/BaseAPI.java +++ b/src/main/java/apiCalls/Utils/generic/BaseAPI.java @@ -11,18 +11,12 @@ public class BaseAPI extends Token { protected static EnvironmentType env = EnvironmentType.getEnum(Properties.get("env", true)); - protected SecretsManager secrets; - - - public BaseAPI() { - secrets= new SecretsManager(); - } - + static Headers headers = new Headers(); public synchronized String adminJWT() throws HttpException { - String adminUser =secrets.getSecret("adminUser"); - String adminPassword = secrets.getSecret("adminPassword"); + String adminUser =SecretsManager.getSecret("adminUser"); + String adminPassword = SecretsManager.getSecret("adminPassword"); if(getAdminToken() == null){ generateAdminToken(adminUser, adminPassword); } diff --git a/src/main/java/apiCalls/actions/UserDetails.java b/src/main/java/apiCalls/actions/UserDetails.java index 41647b6..fb2e68a 100644 --- a/src/main/java/apiCalls/actions/UserDetails.java +++ b/src/main/java/apiCalls/actions/UserDetails.java @@ -20,7 +20,6 @@ public class UserDetails extends BaseAPI { private Headers apiHeaders = new Headers(); private String jwtToken; - private String adminToken; private String organisationId; EnvironmentType env = EnvironmentType.getEnum(Properties.get("env", true));