Basic "scotty auth" implementation

This commit is contained in:
Philipp Wolfer 2023-11-19 23:52:13 +01:00
parent 8b227cb514
commit 14d944c7ad
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
8 changed files with 238 additions and 6 deletions

View file

@ -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"
}