+
+ @EPAuditLog
+ @PostMapping(value = { "/validateCookie" })
+ public boolean validateCookie(@RequestBody EPServiceCookie epServiceCookie, HttpServletRequest request) throws Exception {
+ Map<String,String> epServiceCookieValueMap = epServiceCookie.getValue();
+ if(epServiceCookieValueMap!=null) {
+ String multifactorauthfrontendurl = SystemProperties.getProperty("frontend_url");
+ String encryptedJSessionId = epServiceCookieValueMap.get(multifactorauthfrontendurl);
+ if(encryptedJSessionId != null) {
+ String jSessionId = CipherUtil.decryptPKC(encryptedJSessionId);
+ if(jSessionId != null) {
+ if(jSessionId.equals(request.getSession().getId())) {
+ if(MusicUtil.isMusicEnable()) {
+ MusicSession musicSession = new MusicSession();
+ String sessionId = musicSession.getAttribute(encryptedJSessionId);
+ logger.info(EELFLoggerDelegate.errorLogger, "Music sessionid : "+sessionId);
+ return (sessionId != null);
+ } else {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }