summaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'utils/webseal-simulator/src/main/java')
-rw-r--r--utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java1
-rw-r--r--utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java22
2 files changed, 16 insertions, 7 deletions
diff --git a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java
index 4c807f4912..9780c09936 100644
--- a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java
+++ b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java
@@ -148,6 +148,7 @@ public class Login extends HttpServlet {
response.addCookie(cookieLastName);
response.addCookie(cookieRemoteAddress);
response.addCookie(cookieWsType);
+ response.addCookie(new Cookie(Conf.getInstance().getPortalCookieName(), "portal"));
response.sendRedirect("/sdc1");
}
diff --git a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java
index 6b5103f51c..449fe62f49 100644
--- a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java
+++ b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java
@@ -31,10 +31,19 @@ import java.util.Map;
public class Conf {
- private static Conf conf= null;
+ private static Conf conf = new Conf();
private String feHost;
- Map<String,User> users = new HashMap<String,User>();
-
+ private Map<String,User> users = new HashMap<String,User>();
+ private String portalCookieName;
+
+ private void setPortalCookieName(String portalCookieName) {
+ this.portalCookieName = portalCookieName;
+ }
+
+ public String getPortalCookieName() {
+ return portalCookieName;
+ }
+
private Conf(){
initConf();
}
@@ -50,7 +59,9 @@ public class Conf {
Config confFile = ConfigFactory.parseFileAnySyntax(new File(confPath));
Config resolve = confFile.resolve();
setFeHost(resolve.getString("webseal.fe"));
- List<? extends Config> list = resolve.getConfigList("webseal.users");
+ setPortalCookieName(resolve.getString("webseal.portalCookieName"));
+ List<? extends Config> list = resolve.getConfigList("webseal.users");
+
for (Config conf : list ){
String userId = conf.getString("userId");
String password = conf.getString("password");
@@ -67,9 +78,6 @@ public class Conf {
}
public static Conf getInstance(){
- if (conf == null){
- conf = new Conf();
- }
return conf;
}