Provides methods for extracting values from workfront cookies.
Via NPM:
npm i workfront-cookie --save-dev
Package provides UMD bundle, so you can also include it to your page using <script>
tag.
In that case a global variable called WorkfrontCookie
will be created.
Bundle exposes an object with the following items:
A constant string representing name of the Workfront cookie.
Returns Workfront session ID currently stored in the cookie.
In case the second argument is specified, value will be extracted from that string instead of using document.cookie
.
If for some reason it is impossible to determine session ID, this method will return undefined
.
Returns Workfront XSRF token currently stored in the cookie. Eventually, this token will replace sessionID.
In case the second argument is specified, value will be extracted from that string instead of using document.cookie
.
If for some reason it is impossible to determine XSRF token, this method will return undefined
.
Returns value for the given key (name
) stored in cookie.
It case the second argument is specified, value will be extracted from that string instead of using document.cookie
.