mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
700 B
Go
29 lines
700 B
Go
package conf
|
|
|
|
import (
|
|
"github.com/synctv-org/synctv/internal/provider"
|
|
)
|
|
|
|
type OAuth2Config struct {
|
|
Providers map[provider.OAuth2Provider]OAuth2ProviderConfig `yaml:"providers"`
|
|
Plugins []Oauth2Plugin `yaml:"plugins"`
|
|
}
|
|
|
|
type Oauth2Plugin struct {
|
|
PluginFile string `yaml:"plugin_file"`
|
|
Arges []string `yaml:"arges"`
|
|
}
|
|
|
|
type OAuth2ProviderConfig struct {
|
|
ClientID string `yaml:"client_id"`
|
|
ClientSecret string `yaml:"client_secret"`
|
|
RedirectURL string `yaml:"redirect_url"`
|
|
}
|
|
|
|
func DefaultOAuth2Config() OAuth2Config {
|
|
return OAuth2Config{
|
|
Providers: map[provider.OAuth2Provider]OAuth2ProviderConfig{},
|
|
Plugins: []Oauth2Plugin{},
|
|
}
|
|
}
|