diff --git a/modules/spectoconfig/src/main/java/com/axway/apim/config/APIConfig.java b/modules/spectoconfig/src/main/java/com/axway/apim/config/APIConfig.java index 3e6313b6..7bfd571d 100644 --- a/modules/spectoconfig/src/main/java/com/axway/apim/config/APIConfig.java +++ b/modules/spectoconfig/src/main/java/com/axway/apim/config/APIConfig.java @@ -47,9 +47,6 @@ public Map getOutboundProfiles() { public List getSecurityProfiles() { - if (api.getSecurityProfiles().size() == 1) { - return Collections.emptyList(); - } return api.getSecurityProfiles(); } diff --git a/modules/spectoconfig/src/main/java/com/axway/apim/config/GenerateTemplate.java b/modules/spectoconfig/src/main/java/com/axway/apim/config/GenerateTemplate.java index 15247a1a..c2bf2108 100644 --- a/modules/spectoconfig/src/main/java/com/axway/apim/config/GenerateTemplate.java +++ b/modules/spectoconfig/src/main/java/com/axway/apim/config/GenerateTemplate.java @@ -214,6 +214,7 @@ public APIConfig generateTemplate(GenerateTemplateParameters parameters) throws String frontendAuthType = parameters.getFrontendAuthType(); // If frontendAuthType is null, use authentication from openapi spec. If none found, set it as pass through List securityProfiles = addInboundSecurityToAPI(frontendAuthType); + api.setSecurityProfiles(securityProfiles); String backendAuthType = parameters.getBackendAuthType(); addOutboundSecurityToAPI(api, backendAuthType); String apiSpecLocation; @@ -228,7 +229,6 @@ public APIConfig generateTemplate(GenerateTemplateParameters parameters) throws List methods = addMethods(openAPI); api.setApiMethods(methods); } - if (parameters.isInboundPerMethodOverride()) { Map inboundProfileMap = addInboundPerMethodOverride(openAPI, api, securityProfiles); api.setInboundProfiles(inboundProfileMap);