包含Go API项目的所有源代码、配置文件、Docker配置、文档和前端资源 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
700 B
Go
26 lines
700 B
Go
package system_setting
|
|
|
|
import "one-api/setting/config"
|
|
|
|
type OIDCSettings struct {
|
|
Enabled bool `json:"enabled"`
|
|
ClientId string `json:"client_id"`
|
|
ClientSecret string `json:"client_secret"`
|
|
WellKnown string `json:"well_known"`
|
|
AuthorizationEndpoint string `json:"authorization_endpoint"`
|
|
TokenEndpoint string `json:"token_endpoint"`
|
|
UserInfoEndpoint string `json:"user_info_endpoint"`
|
|
}
|
|
|
|
// 默认配置
|
|
var defaultOIDCSettings = OIDCSettings{}
|
|
|
|
func init() {
|
|
// 注册到全局配置管理器
|
|
config.GlobalConfig.Register("oidc", &defaultOIDCSettings)
|
|
}
|
|
|
|
func GetOIDCSettings() *OIDCSettings {
|
|
return &defaultOIDCSettings
|
|
}
|