Type of the device.
Type of the location.
Options object.
It should not be modified after, as it will be used without being cloned.
Create new user session for subject
.
Subject the session will belong to.
Operation context.
Session ttl. Takes precedence over the default one.
User session id.
Delete user session.
Subject.
Id of the user session.
Delete all of the user sessions.
Subject.
Number of deleted sessions.
Read user session from external storage.
When idle functionality is activated, this method might delete user session and throw an error to notify about this,
if it was idle for more than {@link UserSessionManagerOptions.timeouts.idle} seconds.
When renew functionality is activated, this method might create a new user session, and return it's id as the second part of the tuple.
In case renewed session id is returned, it needs to be sent to application clients via 'Set-Cookie' header to replace the old session cookie.
The old session will still be available for {@link UserSessionManagerOptions.timeouts.oldSessionAvailabilityAfterRenewal} seconds,
so that older requests might complete successfully and client has time to refresh session id on it's side.
Subject.
Session id.
Operation context.
A tuple with the following parts: - session metadata - renewed session id (if renewal took place)
Read all active sessions of the subject.
Subject.
Active sessions of the subject.
Renew user session.
Renewing consist from the following actions:
1. scheduling deletion of the old session in a very short amount of time
2. creating a new user session
Subject.
Id of the session to be renewed.
Metadata of that session.
Operation context.
The new user session id.
When renew can't be performed, a log message is printed and null is returned.
Hashes session id.
Useful for logging purposes.
Session id.
Hashed session id.
Stateful implementation of the user sessions.
Session data is stored in external storage and client receives only it's id.
Sessions are implemented in a such way, so that they can be used in cluster or single-node infrastructures.