Skip to content
Snippets Groups Projects
Commit cded8341 authored by Sherman Yang's avatar Sherman Yang
Browse files

remove on behave of related logic

parent 81ca17cb
No related branches found
No related tags found
1 merge request!6Trusted ibm
......@@ -13,7 +13,6 @@ public class Config {
private static final String DEFAULT_DATA_PARTITION_ID_TENANT1 = "";
private static final String DEFAULT_DATA_PARTITION_ID_TENANT2 = "";
private static final String DEFAULT_SEARCH_INTEGRATION_TESTER = "";
private static final String DEFAULT_SEARCH_ON_BEHALF_INTEGRATION_TESTER = "";
private static final String DEFAULT_TARGET_AUDIENCE = "";
......@@ -39,10 +38,6 @@ public class Config {
return getEnvironmentVariableOrDefaultValue("SEARCH_INTEGRATION_TESTER", DEFAULT_SEARCH_INTEGRATION_TESTER);
}
public static String getOnBehalfKeyValue() {
return getEnvironmentVariableOrDefaultValue("SEARCH_ON_BEHALF_INTEGRATION_TESTER", DEFAULT_SEARCH_ON_BEHALF_INTEGRATION_TESTER);
}
public static String getDataPartitionIdTenant1() {
return getEnvironmentVariableOrDefaultValue("DEFAULT_DATA_PARTITION_ID_TENANT1", DEFAULT_DATA_PARTITION_ID_TENANT1);
}
......
......@@ -30,7 +30,6 @@ import java.util.List;
class JwtTokenUtil {
private static String accessToken;
private static String onBehalfAccessToken;
static String getAccessToken() throws IOException {
......@@ -39,13 +38,6 @@ class JwtTokenUtil {
}
return accessToken;
}
static String getOnBehalfAccessToken() throws IOException {
if (Strings.isNullOrEmpty(onBehalfAccessToken)) {
onBehalfAccessToken = getServiceAccountAccessToken(getJwtForOnBehalfIntegrationTesterAccount());
}
return onBehalfAccessToken;
}
private static String getServiceAccountAccessToken(String key) throws IOException {
......@@ -73,11 +65,6 @@ class JwtTokenUtil {
return getJwt(serviceAccountFile);
}
private static String getJwtForOnBehalfIntegrationTesterAccount() throws IOException {
String serviceAccountFile = Config.getOnBehalfKeyValue();
return getJwt(serviceAccountFile);
}
private static String getJwt(String serviceAccountFile) throws IOException {
String targetAudience = Config.getTargetAudience();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment