Title: | User Session for 'Ambiorix' |
---|---|
Description: | Track user sessions in 'Ambiorix' applications. |
Authors: | John Coene [aut, cre], Opifex [fnd, cph] |
Maintainer: | John Coene <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.0.0.9000 |
Built: | 2025-03-13 02:44:44 UTC |
Source: | https://github.com/ambiorix-web/eburones |
DBI backend for sessions.
new()
DBI$new(con, table)
con
Live DBI connection.
table
Name of table to store sessions.
The table must exists, it must also contain the expected
columns, as well as a key
column where the user token will
be stored.
Constructor
set()
DBI$set(key, value)
key
Key of the value
.
value
Value to store.
Add a key-value pair to the map.
has()
DBI$has(key = NULL)
key
Key of the value
.
Check whether a key is present in the map.
get()
DBI$get(key)
key
Key of the value
.
Retrieve a value given its key.
clone()
The objects of this class are cloneable with this method.
DBI$clone(deep = FALSE)
deep
Whether to make a deep clone.
Session middleware.
eburones( ..., name = "session", backend = Local$new(), callback = function(req, res) list(), identifier = token_create )
eburones( ..., name = "session", backend = Local$new(), callback = function(req, res) list(), identifier = token_create )
... |
Passed to the |
name |
Cookie name. |
backend |
Storage class to keep track of callbacks. |
callback |
Function to run when a callback is created or retrieved. |
identifier |
Function that creates a unique token. This is run when creating a new session. |
Local backend for sessions. Do not use this in production, it will likely leka memory and will not track sessions on load balancers.
new()
Local$new()
Constructor
set()
Local$set(key, value)
key
Key of the value
.
value
Value to store.
Add a key-value pair to the map.
has()
Local$has(key)
key
Key of the value
.
Check whether a key is present in the map.
get()
Local$get(key)
key
Key of the value
.
Retrieve a value given its key.
clone()
The objects of this class are cloneable with this method.
Local$clone(deep = FALSE)
deep
Whether to make a deep clone.
Mongo db backend for sessions.
new()
Mongo$new(con, key)
con
Live DBI connection.
key
Name of key to use internally.
Constructor
set()
Mongo$set(key, value)
key
Key of the value
.
value
Value to store.
Add a key-value pair to the map.
has()
Mongo$has(key = NULL)
key
Key of the value
.
Check whether a key is present in the map.
get()
Mongo$get(key)
key
Key of the value
.
Retrieve a value given its key.
clone()
The objects of this class are cloneable with this method.
Mongo$clone(deep = FALSE)
deep
Whether to make a deep clone.