Module minerva_cache::auth
source · [−]Expand description
This submodule contains implementations related to saving and recovering session objects on the Redis cache.
Constants
Session data expiration time. Counts exactly to 24 hours.
Functions
Generates a Redis key for the session to be stored on Redis. This key name
manipulation occurs mostly to avoid conflicts in multi-tenant scenarios.
The output has a format such as
<TENANT>$SESSION:<TOKEN>
.Retrieves session data from Redis, given a tenant and the session token.
If exists, returns the session data in JSON format, as a string.
Removes session data from Redis. Will attempt to delete the data from a
single session, given a tenant and the session token. If the key doesn’t
exist on Redis cache, returns a successful result anyway.
Saves session data to Redis, given a tenant, the session token, and its data
formatted as a JSON string.