feat: add session expiration tracking and validation
feat: implement Redis caching for terminated sessions feat: add new session GUID queries for validation refactor: extend Session model with last_refresh_exp_time refactor: update token generation to include role and session refactor: modify auth middleware to validate session status refactor: replace GetUserSessions with GetValidUserSessions chore: add uuid/v5 dependency fix: update router to pass dependencies to auth middleware chore: update SQL schema and queries for new expiration field
This commit is contained in:
@@ -63,15 +63,16 @@ type ProfileSetting struct {
|
||||
}
|
||||
|
||||
type Session struct {
|
||||
ID int64
|
||||
UserID int64
|
||||
Guid pgtype.UUID
|
||||
Name *string
|
||||
Platform *string
|
||||
LatestIp *string
|
||||
LoginTime pgtype.Timestamp
|
||||
LastSeenDate pgtype.Timestamp
|
||||
Terminated *bool
|
||||
ID int64
|
||||
UserID int64
|
||||
Guid pgtype.UUID
|
||||
Name *string
|
||||
Platform *string
|
||||
LatestIp *string
|
||||
LoginTime pgtype.Timestamp
|
||||
LastRefreshExpTime pgtype.Timestamp
|
||||
LastSeenDate pgtype.Timestamp
|
||||
Terminated *bool
|
||||
}
|
||||
|
||||
type User struct {
|
||||
|
||||
Reference in New Issue
Block a user