1

How to get jsessionid shown in browser console in worklight. I have tried document.cookie, but it was invain. I am able to get only WL_PERSISTENT_COOKIE value here.

var sessionId = document.cookie;

Edit:

Pls see https://i.stack.imgur.com/VMm5p.png

On giving document.cookie, I am getting the value of WL_PERSISTENT_COOKIE. But I need the value of JSESSIONID.

Athira
  • 9
  • 6

1 Answers1

2

JSESSIONID in Worklight is flagged as HttpOnly.

This is a security feature that prevents JavaScript access of a cookie, therefore reducing risks of XSS attacks.

They may be workarounds I don't know about.

Read more: https://www.owasp.org/index.php/HttpOnly

Nathan H
  • 48,033
  • 60
  • 165
  • 247