Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAuthorization ¶
type ClientAuthorization struct {
gorm.Model
LoginHash []byte `gorm:"uniqueIndex;size:32;not null"` // SHA256(logintoken)
PollHash []byte `gorm:"uniqueIndex;size:32;not null"` // SHA256(polltoken)
ClientID string `gorm:"uniqueIndex;size:36;not null"` // UUIDv4
UserAgent string `gorm:"size:512;not null"`
ExpiresAt time.Time `gorm:"index;not null"`
ApprovedAt *time.Time // null = PENDING; non-null = APPROVED
UserID string `gorm:"size:64;index"` // populated on approval
Username string `gorm:"size:255"` // populated on approval
DeviceName string `gorm:"size:64"` // populated on approval
}
ClientAuthorization is the persisted state of one client enrolment through the login flow. gorm.Model gives ID, CreatedAt, UpdatedAt and DeletedAt; DeletedAt drives the soft-delete that marks an authorization consumed, denied or expired.
Click to show internal directories.
Click to hide internal directories.