Closed x-077 closed 1 year ago
Yes, this is a good feature request. I will look at implementing it. Perhaps we need to add something like `session.subject = "user-x" that then get's stored nicely in databases, so that you could delete sessions by user, or limit that user can have just single session at time.
Relates to #131
@bungle Any update onto this? Would require such a feature too. Is there any workaround how to get to the same id as stored inside redis, so I can interact with the redis data directly?
@matth-c3 Have you found a way to get the id?
Bump this, please don't let this library die.
Has anybody a hint for this problem?
The 4.0.0 has store_metadata
option that enables collecting the sessions per user. It is to be used with :set_subject("jere")
and perhaps :set_audience("my-audience")
. Audience can also be set on config level.
Hello,
Im using
resty.openidc
and they provide an optionslifecycle
that allow us to manipulate the session in 4 lifecycle options :handle_created
,handle_authenticated
,handle_regenerated
andhandle_logout
are methods that take the session as argument.Example:
I would like to keep track of the sessions id of each user but Im not sure how to get it. As indicated in the documentation,
by default it is 16 bytes long (raw binary bytes)
.How can I convert it to a string ? Is this the appropriate way to get the session id ?
To be clear, I would like to get the same id than in redis (example
P-WhIe1pYvzPGio8oQjDpw
) :thanks