mirror of
https://github.com/nezhahq/nezha.git
synced 2025-03-11 08:18:13 -04:00

Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Contributors / contributors (push) Has been cancelled
Sync / sync-to-jihulab (push) Has been cancelled
Run Tests / tests (macos) (push) Has been cancelled
Run Tests / tests (ubuntu) (push) Has been cancelled
Run Tests / tests (windows) (push) Has been cancelled
25 lines
465 B
Go
25 lines
465 B
Go
package model
|
|
|
|
type Oauth2Bind struct {
|
|
Common
|
|
|
|
UserID uint64 `gorm:"uniqueIndex:u_p_o" json:"user_id,omitempty"`
|
|
Provider string `gorm:"uniqueIndex:u_p_o" json:"provider,omitempty"`
|
|
OpenID string `gorm:"uniqueIndex:u_p_o" json:"open_id,omitempty"`
|
|
}
|
|
|
|
type Oauth2LoginType uint8
|
|
|
|
const (
|
|
_ Oauth2LoginType = iota
|
|
RTypeLogin
|
|
RTypeBind
|
|
)
|
|
|
|
type Oauth2State struct {
|
|
Action Oauth2LoginType
|
|
Provider string
|
|
State string
|
|
RedirectURL string
|
|
}
|