Download setting/system_setting/oidc.go from AZILS/new-api: direct link, hf CLI and curl.
- Browser
- Download file 723 Bytes
-
https://huggingface.co/spaces/AZILS/new-api/resolve/main/setting/system_setting/oidc.go
- Command line
-
hf download hf://spaces/AZILS/new-api/setting/system_setting/oidc.go
-
curl -L -o oidc.go https://huggingface.co/spaces/AZILS/new-api/resolve/main/setting/system_setting/oidc.go
723 Bytes
| package system_setting | |
| import "github.com/QuantumNous/new-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 | |
| } | |