Similar to the default Play Session but using JsObject instead of Map[String, String]. The data is separated into two attributes: headerData
and claimData
. There is also a optional signature. Most of the time, you should only care about the claimData
which stores the claim of the token containing the custom values you eventually put in it. That's why all methods of JwtSession
(such as add and removing values) only modifiy the claimData
.
To see a full list of samples, check the online documentation.
'''Warning''' Be aware that if you override the claimData
(using withClaim
for example), you might override some attributes that were automatically put inside the claim such as the expiration of the token.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Merge the value
with claimData
Merge the value
with claimData
Attributes
Add this (key, value) to claimData
(existing key will be overriden)
Add this (key, value) to claimData
(existing key will be overriden)
Attributes
Convert value
to its JSON counterpart and add it to claimData
Convert value
to its JSON counterpart and add it to claimData
Attributes
Add a sequence of (key, value) to claimData
Add a sequence of (key, value) to claimData
Attributes
Remove one key from claimData
Remove one key from claimData
Attributes
Remove a sequence of keys from claimData
Remove a sequence of keys from claimData
Attributes
Retrieve the value corresponding to fieldName
from claimData
Retrieve the value corresponding to fieldName
from claimData
Attributes
After retrieving the value, try to read it as T, if no value or fails, returns None.
After retrieving the value, try to read it as T, if no value or fails, returns None.
Attributes
If your Play app config has a session.maxAge
, it will extend the expiration by that amount
If your Play app config has a session.maxAge
, it will extend the expiration by that amount
Attributes
Encode the session as a JSON Web Token
Encode the session as a JSON Web Token
Attributes
Overrride the claimData
Overrride the claimData
Attributes
Override the headerData
Override the headerData
Attributes
Override the signature
(seriously, you should never need this method)
Override the signature
(seriously, you should never need this method)