Add todo Comments

master
Dharmakeerthi Lasantha 2 years ago committed by pasindu
parent da4f3f1456
commit 2125519aa6

@ -242,9 +242,11 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
boolean isAllowedAllDomains, boolean isAllowedAllDomains,
String validityTime, TokenInfo tokenInfo) throws APIManagerException { String validityTime, TokenInfo tokenInfo) throws APIManagerException {
ConsumerRESTAPIServices consumerRESTAPIServices = ConsumerRESTAPIServices consumerRESTAPIServices =
APIApplicationManagerExtensionDataHolder.getInstance().getConsumerRESTAPIServices(); APIApplicationManagerExtensionDataHolder.getInstance().getConsumerRESTAPIServices();
ApiApplicationInfo applicationInfo = getApplicationInfo(username, password);
try { try {
List<APIInfo> uniqueApiList = new ArrayList<>(); List<APIInfo> uniqueApiList = new ArrayList<>();
@ -311,6 +313,16 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
throw new APIManagerException(msg); 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) { } catch (APIServicesException e) {
String msg = "Error occurred while processing the response of APIM REST endpoints."; String msg = "Error occurred while processing the response of APIM REST endpoints.";
log.error(msg, e); log.error(msg, e);

Loading…
Cancel
Save