Open tciuro opened 10 years ago
There doesn't appear to be a value exposed to figure this out.
Would it be possible to expose the expiresIn
value?
I'd consider an expiresAt method. however, adding any property to the exposed object would be a breaking change. If anyone's session included a property with same name (perhaps a different purpose), they wouldn't be able to access it anymore ...
I understand. Perhaps add an underbar to indicate internal/private ownership? (i.e. _expiresAt
). Another option could be prefixing the property (i.e. client_session_expiresAt
). The likelihood of a collision would be minimized.
You could put these special functions or properties on a prototype object:
var session = Object.create({ expiresAt: ... })
Then if someone sets expiresAt
on the session they'll just shadow the prototype, and no one's application is broken.
@mstade can you elaborate a little ?
I think it will be great if there were debug options for this lib so we can run it in debug mode to get all kind of the information.
Was thinking about debug module.
I can send a PR, I will add debug on the expiresAt
variable, but I don't exactly know what other session state variables are interesting
Given a session, is it possible to determine what the expiration date is? I was hoping to have access to
expiresIn
or a similar property, but I don't see any property I can use.Any ideas? Thanks!