value to its JSON counterpart and add it to
Add this (key, value) to
claimData (existing key will be overriden)
Add a sequence of (key, value) to
Remove one key from
Remove a sequence of keys from
Retrieve the value corresponding to
After retrieving the value, try to read it as T, if no value or fails, returns None.
If your Play app config has a
session.maxAge, it will extend the expiration by that amount
Encode the session as a JSON Web Token
signature (seriously, you should never need this method)
Similar to the default Play Session but using JsObject instead of Map[String, String]. The data is separated into two attributes:
claimData. There is also a optional signature. Most of the time, you should only care about the
claimDatawhich 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
To see a full list of samples, check the online documentation.
Warning Be aware that if you override the
withClaimfor example), you might override some attributes that were automatically put inside the claim such as the expiration of the token.