更新依赖项,优化 OAuth2 服务,添加 PKCE 支持,增强 OIDC 处理器,新增客户端注册和令牌管理端点,改进数据库模型以支持新功能。
This commit is contained in:
@@ -8,13 +8,16 @@ import (
|
||||
|
||||
type AuthorizationCode struct {
|
||||
gorm.Model
|
||||
Code string `gorm:"uniqueIndex;not null"`
|
||||
ClientID string `gorm:"not null"`
|
||||
UserID uint `gorm:"not null"`
|
||||
RedirectURI string `gorm:"not null"`
|
||||
Scope string `gorm:"not null"`
|
||||
ExpiresAt time.Time `gorm:"not null"`
|
||||
Used bool `gorm:"default:false"`
|
||||
Code string `gorm:"uniqueIndex;not null"`
|
||||
ClientID string `gorm:"not null"`
|
||||
UserID uint `gorm:"not null"`
|
||||
RedirectURI string `gorm:"not null"`
|
||||
Scope string `gorm:"not null"`
|
||||
ExpiresAt time.Time `gorm:"not null"`
|
||||
Used bool `gorm:"default:false"`
|
||||
CodeChallenge string `gorm:"type:varchar(128)"`
|
||||
CodeChallengeMethod string `gorm:"type:varchar(20)"`
|
||||
Nonce string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
func (ac *AuthorizationCode) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user