Implement saved sessions

This commit is contained in:
William Bouzourène 2025-01-08 15:21:47 +01:00
parent 025b984314
commit fa0e917d34
Signed by: bouzoure
SSH key fingerprint: SHA256:19MbXpLua4rUtk8tunMesD8KUKb91LXLHg8E/qTooww
9 changed files with 187 additions and 0 deletions

View file

@ -2,6 +2,7 @@ package models
import (
"database/sql"
"time"
"gorm.io/gorm"
)
@ -25,3 +26,13 @@ type UserRole struct {
SectionID uint
Section Section
}
// TODO: Autoclean expired sessions
type UserSavedSession struct {
gorm.Model
UserID uint
User User
UUID string
Secret string
Expiration time.Time
}