feat: allow encrypting user api token using gorm serializer

This commit is contained in:
Christoph 2026-04-01 11:42:07 +02:00
parent 920806b231
commit 87bfd5b23a
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ type User struct {
WebAuthnCredentialList []UserWebauthnCredential `gorm:"foreignKey:user_identifier"` // the webauthn credentials of the user, used for webauthn authentication
// API token for REST API access
ApiToken string `form:"api_token" binding:"omitempty"`
ApiToken string `form:"api_token" binding:"omitempty" gorm:"serializer:encstr"`
ApiTokenCreated *time.Time
LinkedPeerCount int `gorm:"-"`