mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
Oidc (#109)
* 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:
@@ -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"},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user