Add todo Comments

apim420
Dharmakeerthi Lasantha 1 year ago committed by pasindu
parent da4f3f1456
commit 2125519aa6

@ -242,9 +242,11 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
boolean isAllowedAllDomains,
String validityTime, TokenInfo tokenInfo) throws APIManagerException {
ConsumerRESTAPIServices consumerRESTAPIServices =
APIApplicationManagerExtensionDataHolder.getInstance().getConsumerRESTAPIServices();
ApiApplicationInfo applicationInfo = getApplicationInfo(username, password);
try {
List<APIInfo> uniqueApiList = new ArrayList<>();
@ -311,6 +313,16 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
throw new APIManagerException(msg);
}
}
if (isNewApplication) {
ApplicationKey applicationKey = consumerRESTAPIServices.generateApplicationKeys(applicationInfo, application);
ApiApplicationKey apiApplicationKey = new ApiApplicationKey();
apiApplicationKey.setConsumerKey(applicationKey.getConsumerKey());
apiApplicationKey.setConsumerSecret(applicationKey.getConsumerSecret());
return apiApplicationKey;
} else {
return null;
}
} catch (APIServicesException e) {
String msg = "Error occurred while processing the response of APIM REST endpoints.";
log.error(msg, e);

Loading…
Cancel
Save