aboutsummaryrefslogtreecommitdiffstats
path: root/models-sim/models-sim-dmaap
diff options
context:
space:
mode:
Diffstat (limited to 'models-sim/models-sim-dmaap')
-rw-r--r--models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/parameters/RestServerParameters.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/parameters/RestServerParameters.java b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/parameters/RestServerParameters.java
index 8414d0718..04d914c1a 100644
--- a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/parameters/RestServerParameters.java
+++ b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/parameters/RestServerParameters.java
@@ -45,6 +45,12 @@ public class RestServerParameters extends ParameterGroupImpl {
@Min(value = 1)
private int port;
+ private String userName;
+
+ private String password;
+
+ private boolean useHttps;
+
public RestServerParameters() {
super(RestServerParameters.class.getSimpleName());
}
@@ -69,6 +75,12 @@ public class RestServerParameters extends ParameterGroupImpl {
DmaapSimRestControllerV1.class.getName());
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_MANAGED_SUFFIX, "false");
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_SWAGGER_SUFFIX, "false");
+ props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_HTTPS_SUFFIX, Boolean.toString(isUseHttps()));
+
+ if (getUserName() != null && getPassword() != null) {
+ props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_AUTH_USERNAME_SUFFIX, getUserName());
+ props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_AUTH_PASSWORD_SUFFIX, getPassword());
+ }
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_SERIALIZATION_PROVIDER,
String.join(",", CambriaMessageBodyHandler.class.getName(),