docs(api/v2): tag TOTP fields for the v2 schema

This commit is contained in:
kolaente 2026-06-10 15:14:52 +02:00 committed by kolaente
parent a562f69f02
commit 4afcfa4441
1 changed files with 3 additions and 3 deletions

View File

@ -37,11 +37,11 @@ import (
type TOTP struct {
ID int64 `xorm:"bigint autoincr not null unique pk" json:"-"`
UserID int64 `xorm:"bigint not null" json:"-"`
Secret string `xorm:"text not null" json:"secret"`
Secret string `xorm:"text not null" json:"secret" readOnly:"true" doc:"The shared secret used to generate passcodes, generated by the server on enrollment."`
// The totp entry will only be enabled after the user verified they have a working totp setup.
Enabled bool `xorm:"null" json:"enabled"`
Enabled bool `xorm:"null" json:"enabled" readOnly:"true" doc:"Whether totp is fully activated. Set to true only after the user confirms a passcode."`
// The totp url used to be able to enroll the user later
URL string `xorm:"text null" json:"url"`
URL string `xorm:"text null" json:"url" readOnly:"true" doc:"The otpauth:// url, generated by the server, used to enroll the user in an authenticator app."`
}
// TableName holds the table name for totp secrets