updates to the oauth work

This commit is contained in:
Ziti-Ci
2023-09-05 09:55:55 -05:00
parent 18424a1b48
commit 2b0dc71f93
23 changed files with 1136 additions and 187 deletions

View File

@@ -9,6 +9,29 @@ type Config struct {
Identity string
Address string
HostMatch string
Oauth *OauthConfig
}
type OauthConfig struct {
Port int
RedirectUrl string
HashKeyRaw string
Providers []*OauthProviderSecrets
}
func (oc *OauthConfig) GetProvider(name string) *OauthProviderSecrets {
for _, provider := range oc.Providers {
if provider.Name == name {
return provider
}
}
return nil
}
type OauthProviderSecrets struct {
Name string
ClientId string
ClientSecret string
}
func DefaultConfig() *Config {