mirror of
https://github.com/h44z/wg-portal.git
synced 2026-04-02 21:46:20 +00:00
feat: allow encrypting user api token using gorm serializer
This commit is contained in:
@@ -68,7 +68,7 @@ type User struct {
|
|||||||
WebAuthnCredentialList []UserWebauthnCredential `gorm:"foreignKey:user_identifier"` // the webauthn credentials of the user, used for webauthn authentication
|
WebAuthnCredentialList []UserWebauthnCredential `gorm:"foreignKey:user_identifier"` // the webauthn credentials of the user, used for webauthn authentication
|
||||||
|
|
||||||
// API token for REST API access
|
// 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
|
ApiTokenCreated *time.Time
|
||||||
|
|
||||||
LinkedPeerCount int `gorm:"-"`
|
LinkedPeerCount int `gorm:"-"`
|
||||||
|
|||||||
Reference in New Issue
Block a user