mirror of
https://github.com/openziti/zrok.git
synced 2025-08-18 11:49:51 +02:00
updates to the oauth work
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user