mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 13:47:05 +02:00
Basic "scotty auth" implementation
This commit is contained in:
parent
8b227cb514
commit
14d944c7ad
8 changed files with 238 additions and 6 deletions
|
@ -24,6 +24,8 @@ package storage
|
|||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
type ImportTimestamp struct {
|
||||
|
@ -34,3 +36,14 @@ type ImportTimestamp struct {
|
|||
UpdatedAt time.Time
|
||||
Timestamp time.Time `gorm:"default:'1970-01-01T00:00:00'"`
|
||||
}
|
||||
|
||||
type OAuth2Token struct {
|
||||
Service string `gorm:"primaryKey"`
|
||||
Token datatypes.JSON `gorm:"type:json"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (OAuth2Token) TableName() string {
|
||||
return "oauth2_tokens"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue