mirror of
https://github.com/nezhahq/nezha.git
synced 2025-03-12 00:38:13 -04:00
fix: oauth2 config not loaded (#1018)
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
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
This commit is contained in:
parent
ee63b3a808
commit
731bc9521a
@ -5,18 +5,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Oauth2Config struct {
|
type Oauth2Config struct {
|
||||||
ClientID string `mapstructure:"client_id" json:"client_id,omitempty"`
|
ClientID string `koanf:"client_id" json:"client_id,omitempty"`
|
||||||
ClientSecret string `mapstructure:"client_secret" json:"client_secret,omitempty"`
|
ClientSecret string `koanf:"client_secret" json:"client_secret,omitempty"`
|
||||||
Endpoint Oauth2Endpoint `mapstructure:"endpoint" json:"endpoint,omitempty"`
|
Endpoint Oauth2Endpoint `koanf:"endpoint" json:"endpoint,omitempty"`
|
||||||
Scopes []string `mapstructure:"scopes" json:"scopes,omitempty"`
|
Scopes []string `koanf:"scopes" json:"scopes,omitempty"`
|
||||||
|
|
||||||
UserInfoURL string `mapstructure:"user_info_url" json:"user_info_url,omitempty"`
|
UserInfoURL string `koanf:"user_info_url" json:"user_info_url,omitempty"`
|
||||||
UserIDPath string `mapstructure:"user_id_path" json:"user_id_path,omitempty"`
|
UserIDPath string `koanf:"user_id_path" json:"user_id_path,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Oauth2Endpoint struct {
|
type Oauth2Endpoint struct {
|
||||||
AuthURL string `mapstructure:"auth_url" json:"auth_url,omitempty"`
|
AuthURL string `koanf:"auth_url" json:"auth_url,omitempty"`
|
||||||
TokenURL string `mapstructure:"token_url" json:"token_url,omitempty"`
|
TokenURL string `koanf:"token_url" json:"token_url,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Oauth2Config) Setup(redirectURL string) *oauth2.Config {
|
func (c *Oauth2Config) Setup(redirectURL string) *oauth2.Config {
|
||||||
|
Loading…
Reference in New Issue
Block a user