Minor fixes in application registration flow

synced-apim420
Pasindu Rupasinghe 10 months ago
parent 6022d12a96
commit 47bc27a36d

@ -112,12 +112,14 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
} }
Map<String, APIInfo> uniqueApiSet = new HashMap<>(); Map<String, APIInfo> uniqueApiSet = new HashMap<>();
for (String tag : tags) { if (tags != null) {
Map<String, String> queryParams = new HashMap<>(); for (String tag : tags) {
queryParams.put("tag", tag); Map<String, String> queryParams = new HashMap<>();
queryParams.put("tag", tag);
APIInfo[] apiInfos = consumerRESTAPIServices.getAllApis(apiApplicationInfo, queryParams, headerParams); APIInfo[] apiInfos = consumerRESTAPIServices.getAllApis(apiApplicationInfo, queryParams, headerParams);
Arrays.stream(apiInfos).forEach(apiInfo -> uniqueApiSet.putIfAbsent(apiInfo.getName(), apiInfo)); Arrays.stream(apiInfos).forEach(apiInfo -> uniqueApiSet.putIfAbsent(apiInfo.getName(), apiInfo));
}
} }
List<APIInfo> uniqueApiList = new ArrayList<>(uniqueApiSet.values()); List<APIInfo> uniqueApiList = new ArrayList<>(uniqueApiSet.values());

@ -135,7 +135,8 @@ public class KeyMgtServiceImpl implements KeyMgtService {
//todo --> can use requestingUserAccessToken token here to get application data - modify getApplication //todo --> can use requestingUserAccessToken token here to get application data - modify getApplication
// method signature // method signature
io.entgra.device.mgt.core.apimgt.extension.rest.api.bean.APIMConsumer.Application application = getApplication(clientName, owner); io.entgra.device.mgt.core.apimgt.extension.rest.api.bean.APIMConsumer.Application application =
getApplication(clientName, requestingUserAccessToken);
String applicationUUID = application.getApplicationId(); String applicationUUID = application.getApplicationId();
// do app key mapping // do app key mapping

Loading…
Cancel
Save