summaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/main
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-09-19 12:41:45 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-19 12:41:45 +0000
commite65a996147ba28eb5287564d4a0624a2c20347ea (patch)
treea49dfc299451d82528dddf256d4583557e1b8e1a /policy-endpoints/src/main
parent71128148623da679bfdb00b804389f1daabaac86 (diff)
parenta0f011137a139598efa7cfa09df334bd7826d71e (diff)
Merge "Fixes for oparent upgrade"
Diffstat (limited to 'policy-endpoints/src/main')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
index 3b8c08fc..62fa0526 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
@@ -29,6 +29,7 @@ import javax.servlet.DispatcherType;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.HashLoginService;
+import org.eclipse.jetty.security.UserStore;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
@@ -244,8 +245,10 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable
srvltPath = "/*";
}
- HashLoginService hashLoginService = new HashLoginService();
- hashLoginService.putUser(user, Credential.getCredential(password), new String[] {"user"});
+ final HashLoginService hashLoginService = new HashLoginService();
+ final UserStore userStore = new UserStore();
+ userStore.addUser(user, Credential.getCredential(password), new String[] {"user"});
+ hashLoginService.setUserStore(userStore);
hashLoginService.setName(this.connector.getName() + "-login-service");
Constraint constraint = new Constraint();