Appends an event to a session.
The request to append an event.
A promise that resolves to the event that was appended.
Creates a new session.
The request to create a session.
A promise that resolves to the newly created session instance.
Deletes a session.
The request to delete a session.
A promise that resolves when the session is deleted.
Gets a session or creates one if it doesn't exist.
The request to get or create a session.
A promise that resolves to the session instance.
Gets a session.
The request to get a session.
A promise that resolves to the session instance or undefined if not found.
Lists sessions for a user.
The request to list sessions.
A promise that resolves to a list of sessions for the user.
An in-memory implementation of the session service.
Every map below is keyed by untrusted input —
appName,userId,sessionIdand state keys all arrive straight off the request path or body on a dev server — so each is created withObject.create(null). On an ordinary{}literal a key of__proto__resolves to the inherited__proto__accessor instead of creating an own property, somap[appName][userId] = ...writes ontoObject.prototypeand pollutes every object in the process. A null-prototype map has no such accessor, so those keys become ordinary own properties.