Merge pull request #1 from GPrathap/release-2.0.x

removed setting APIs secured as default.
revert-70aa11f8
Milan Perera 8 years ago committed by GitHub
commit 7b8a7c0b52

@ -75,7 +75,7 @@ public class APIPublisherUtil {
api.setUrl(config.getEndpoint()); api.setUrl(config.getEndpoint());
api.addAvailableTiers(provider.getTiers()); api.addAvailableTiers(provider.getTiers());
api.setEndpointSecured(true); api.setEndpointSecured(false);
api.setStatus(APIStatus.CREATED); api.setStatus(APIStatus.CREATED);
api.setTransports(config.getTransports()); api.setTransports(config.getTransports());
api.setApiLevelPolicy(config.getPolicy()); api.setApiLevelPolicy(config.getPolicy());
@ -261,18 +261,7 @@ public class APIPublisherUtil {
} }
apiConfig.setOwner(owner); apiConfig.setOwner(owner);
String isSecuredParam = servletContext.getInitParameter(PARAM_MANAGED_API_IS_SECURED); apiConfig.setSecured(false);
boolean isSecured;
if (isSecuredParam == null || isSecuredParam.isEmpty()) {
if (log.isDebugEnabled()) {
log.debug("'managed-api-isSecured' attribute is not configured. Therefore, using the default, " +
"which is 'true'");
}
isSecured = false;
} else {
isSecured = Boolean.parseBoolean(isSecuredParam);
}
apiConfig.setSecured(isSecured);
String transports = servletContext.getInitParameter(PARAM_MANAGED_API_TRANSPORTS); String transports = servletContext.getInitParameter(PARAM_MANAGED_API_TRANSPORTS);
if (transports == null || transports.isEmpty()) { if (transports == null || transports.isEmpty()) {

@ -403,6 +403,7 @@ public class AnnotationProcessor {
.getMethod(SWAGGER_ANNOTATIONS_PROPERTIES_KEY), annotatedScopes[i], STRING)); .getMethod(SWAGGER_ANNOTATIONS_PROPERTIES_KEY), annotatedScopes[i], STRING));
permissions = (String[])methodHandler.invoke(annotatedScopes[i], scopeClass permissions = (String[])methodHandler.invoke(annotatedScopes[i], scopeClass
.getMethod(SWAGGER_ANNOTATIONS_PROPERTIES_PERMISSIONS, null),null); .getMethod(SWAGGER_ANNOTATIONS_PROPERTIES_PERMISSIONS, null),null);
aggregatedPermissions.setLength(0);
for (String permission : permissions) { for (String permission : permissions) {
aggregatedPermissions.append(permission); aggregatedPermissions.append(permission);
aggregatedPermissions.append(" "); aggregatedPermissions.append(" ");

Loading…
Cancel
Save