You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no clean and performant way to get session expiry, since there is a SetExpiry function it makes sense to have a function that returns the session expiry.
It can be done using something like this :
// middleware/session/session.go// GetExpiry gets the expiration of this sessionfunc (s*Session) GetExpiry() time.Duration {
returns.exp
}
,
Alignment with Express API
This is something similar to :
req.session.cookie.expires
HTTP RFC Standards Compliance
Confirmed.
API Stability
Hence we are only returning the exp variable which is already declared this feature will not have any stability issue.
Thanks for opening your first issue here! 馃帀 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
@sixcolors Should we keep this open and move it to v3?
Ref #2741, my plan is to replace the expires mechanism with an idle timeout approach, as it aligns better with the actual behavior of middleware. The plan for a hard expiry is to leave this as an implementation detail for the user which could be accomplished via a key from the session store. However, it would still be a good idea to allow for access to the idle timeout, probably without extending the session.
Feature Proposal Description
Currently, there is no clean and performant way to get session expiry, since there is a SetExpiry function it makes sense to have a function that returns the session expiry.
It can be done using something like this :
,
Alignment with Express API
This is something similar to :
HTTP RFC Standards Compliance
Confirmed.
API Stability
Hence we are only returning the
exp
variable which is already declared this feature will not have any stability issue.Feature Examples
Checklist:
The text was updated successfully, but these errors were encountered: