aboutsummaryrefslogtreecommitdiffstats
path: root/internal/config/config.go
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2025-08-15 19:20:48 +0100
committerLeonardo Bishop <me@leonardobishop.com>2025-08-15 19:20:48 +0100
commit8f7dec8ba6b2f9bde01afd0a110596ebbd43e0ed (patch)
tree7b4f203d92f4b99b1e98fac314415e293984196b /internal/config/config.go
parent4697556cac819c47d068819b9fc9c3b4ea84e279 (diff)
Implement OIDC
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 564adbe..1acda1e 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -17,10 +17,25 @@ type Config struct {
Conference struct {
ScheduleURL string `yaml:"scheduleURL"`
} `yaml:"conference"`
+ Auth struct {
+ EnableBasicAuth bool `yaml:"enableBasicAuth"`
+ AuthProviders []AuthProvider `yaml:"authProviders"`
+ }
AcceptRegistrations bool `yaml:"acceptRegistrations"`
BaseURL string `yaml:"baseURL"`
}
+type AuthProvider struct {
+ Identifier string `yaml:"identifier"`
+ Name string `yaml:"name"`
+ ClientID string `yaml:"clientID"`
+ ClientSecret string `yaml:"clientSecret"`
+ Endpoint string `yaml:"endpoint"`
+ LoginFilter string `yaml:"loginFilter"`
+ LoginFilterAllowedValues []string `yaml:"loginFilterAllowedValues"`
+ UserSyncFilter string `yaml:"userSyncFilter"`
+}
+
func ReadConfig(configPath string, dst *Config) error {
config, err := os.ReadFile(configPath)
if err != nil {