diff options
author | ys9693 <ys9693@att.com> | 2020-01-19 13:50:02 +0200 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-01-22 12:33:31 +0000 |
commit | 16a9fce0e104a38371a9e5a567ec611ae3fc7f33 (patch) | |
tree | 03a2aff3060ddb5bc26a90115805a04becbaffc9 /utils/webseal-simulator/src/main/java | |
parent | aa83a2da4f911c3ac89318b8e9e8403b072942e1 (diff) |
Catalog alignment
Issue-ID: SDC-2724
Signed-off-by: ys9693 <ys9693@att.com>
Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe
Diffstat (limited to 'utils/webseal-simulator/src/main/java')
-rw-r--r-- | utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java | 1 | ||||
-rw-r--r-- | utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java | 22 |
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; } |