...
The JSMA session provides the following methods:
string session.get(
...
key)
Returns the value of "field"key as string or null if no value is set under the key.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... var username = session.get('username'); ... |
Parameter
...
key:string (required)
The key to be looked up in the flexAttributes of the session.
boolean session.has(
...
key)
Returns true when "field" exists within a boolean value depending on whether key is present for the current session.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... if (session.has('username') === true) { ... } ... |
Parameter
...
key:string(required)
The key tob e checked in the flexAttributes of the session.
string session.id
Returns the id of the current session
...
The desired new session ID.
session.set(
...
key, value)
Sets the value of field fielda specified key for the current session.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... session.set('username', 'IKONA-Admin') ... |
Parameter
...
key:string (required)
The key to be set in the flexAttributes of the session.
Parameter value:string (required)
The value to be set for the key
session.withLock(duration, function)
...