Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
ID string `gorm:"primaryKey"`
Token string `gorm:"uniqueIndex;not null"`
TokenType string `gorm:"not null;default:'Bearer'"`
UserID string `gorm:"not null;index"`
ClientID string `gorm:"not null;index"`
Scopes string `gorm:"not null"` // space-separated scopes
ExpiresAt time.Time
CreatedAt time.Time
}
func (*AccessToken) IsExpired ¶
func (t *AccessToken) IsExpired() bool
type DeviceCode ¶
type DeviceCode struct {
DeviceCode string `gorm:"primaryKey"`
UserCode string `gorm:"uniqueIndex;not null"`
ClientID string `gorm:"not null;index"`
Scopes string `gorm:"not null"` // space-separated scopes
ExpiresAt time.Time
Interval int // polling interval in seconds
UserID string // filled after authorization
Authorized bool `gorm:"default:false"`
AuthorizedAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
func (*DeviceCode) IsExpired ¶
func (d *DeviceCode) IsExpired() bool
type OAuthClient ¶
type OAuthClient struct {
ClientID string `gorm:"primaryKey"`
ClientName string `gorm:"not null"`
Scopes string `gorm:"not null"` // space-separated scopes
CreatedAt time.Time
UpdatedAt time.Time
}
func (OAuthClient) TableName ¶
func (OAuthClient) TableName() string
TableName overrides the table name used by OAuthClient to `oauth_client`
Click to show internal directories.
Click to hide internal directories.