* add oidc config

* inching forward with oidc idp

* lil webfingy fix

* bit more progress

* further oidc

* oidc now working

* document dex config

* replace broken images

* add additional credits

* tiny doc update

* update

* add oidc config

* inching forward with oidc idp

* bit more progress

* further oidc

* oidc now working

* document dex config

* replace broken images

* add additional credits

* tiny doc update

* update

* document

* docs + comments
This commit is contained in:
Tobi Smethurst 2021-07-23 10:36:28 +02:00 committed by GitHub
commit 05e9af089c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 2597 additions and 757 deletions

View file

@ -1,5 +1,7 @@
package config
import "github.com/coreos/go-oidc/v3/oidc"
// TestDefault returns a default config for testing
func TestDefault() *Config {
defaults := GetTestDefaults()
@ -52,6 +54,15 @@ func TestDefault() *Config {
CertDir: defaults.LetsEncryptCertDir,
EmailAddress: defaults.LetsEncryptEmailAddress,
},
OIDCConfig: &OIDCConfig{
Enabled: defaults.OIDCEnabled,
IDPName: defaults.OIDCIdpName,
SkipVerification: defaults.OIDCSkipVerification,
Issuer: defaults.OIDCIssuer,
ClientID: defaults.OIDCClientID,
ClientSecret: defaults.OIDCClientSecret,
Scopes: defaults.OIDCScopes,
},
}
}
@ -107,6 +118,15 @@ func Default() *Config {
CertDir: defaults.LetsEncryptCertDir,
EmailAddress: defaults.LetsEncryptEmailAddress,
},
OIDCConfig: &OIDCConfig{
Enabled: defaults.OIDCEnabled,
IDPName: defaults.OIDCIdpName,
SkipVerification: defaults.OIDCSkipVerification,
Issuer: defaults.OIDCIssuer,
ClientID: defaults.OIDCClientID,
ClientSecret: defaults.OIDCClientSecret,
Scopes: defaults.OIDCScopes,
},
}
}
@ -157,6 +177,14 @@ func GetDefaults() Defaults {
LetsEncryptEnabled: true,
LetsEncryptCertDir: "/gotosocial/storage/certs",
LetsEncryptEmailAddress: "",
OIDCEnabled: false,
OIDCIdpName: "",
OIDCSkipVerification: false,
OIDCIssuer: "",
OIDCClientID: "",
OIDCClientSecret: "",
OIDCScopes: []string{oidc.ScopeOpenID, "profile", "email", "groups"},
}
}
@ -204,5 +232,13 @@ func GetTestDefaults() Defaults {
LetsEncryptEnabled: false,
LetsEncryptCertDir: "",
LetsEncryptEmailAddress: "",
OIDCEnabled: false,
OIDCIdpName: "",
OIDCSkipVerification: false,
OIDCIssuer: "",
OIDCClientID: "",
OIDCClientSecret: "",
OIDCScopes: []string{oidc.ScopeOpenID, "profile", "email", "groups"},
}
}