JSession Forwarder is a Chrome extension that reads the JSESSIONID and XSRF-TOKEN cookies from the current site and sends their values to a specified endpoint via a PATCH request.
- Automatically detects
JSESSIONIDandXSRF-TOKENcookies on the active page. - Sends the session data to your configured endpoint.
- Stores the timestamp of the last successful session forwarding.
- Simple and lightweight Chrome extension with a popup for configuration.
- Clone or download the repository.
- Open Chrome and navigate to
chrome://extensions/. - Enable Developer mode in the top-right corner.
- Click Load unpacked and select the folder containing the extension files.
Note: Once installed, the extension icon will appear in the toolbar.
- Navigate to the website where you are logged in.
- Click the JSession Forwarder icon in the Chrome toolbar.
- The extension will automatically detect the cookies and send them to your endpoint.
- The last sent time is stored in Chrome's local storage alongside with the configured endpoint.
lastExecutionTimestampin Chrome'slocalStoragekeeps track of the timestamp when the last session was successfully sent.- Example of reading it:
chrome.storage.local.get('lastExecutionTimestamp', (data) => {
if (data.lastExecutionTimestamp) {
const lastSent = new Date(data.lastExecutionTimestamp);
console.log('Last session forwarded at:', lastSent.toLocaleString());
}
});The extension requires the following permissions:
cookies– to readJSESSIONIDandXSRF-TOKEN.storage– to store the last sent timestamp.activeTab– to access cookies for the current tab.webRequest/webRequestBlocking(optional) – if you extend it to listen for AJAX requests.
- The extension comes with a toolbar icon representing a cookie and a forwarding arrow.
- 32x32 PNG is used for all required sizes (16×16, 32×32).
- Scalable icon file
icon.svgis also included.
Contributions are welcome. Feel free to submit issues or pull requests for improvements.
This project is licensed under the MIT License.
