54 lines
1.1 KiB
Go
54 lines
1.1 KiB
Go
package conf
|
|
|
|
import "sync"
|
|
|
|
type Config struct {
|
|
SourceMode string
|
|
AdminRole string
|
|
PublicKeyPath string
|
|
PrivateKeyPath string
|
|
|
|
LDAPEndpoints string
|
|
LDAPBindDN string
|
|
LDAPBindPW string
|
|
LDAPBaseDN string
|
|
LDAPUserBaseDN string
|
|
LDAPRoleBaseDN string
|
|
|
|
ClientSecret string
|
|
OAuth2ClientSecretName string
|
|
OAuth2ClientSecretNamespace string
|
|
|
|
Auth string
|
|
AuthConnectPublicHost string
|
|
AuthConnectorHost string
|
|
AuthConnectorPort int
|
|
AuthConnectorAdminPort string
|
|
|
|
PermissionConnectorWriteHost string
|
|
PermissionConnectorReadHost string
|
|
PermissionConnectorPort string
|
|
PermissionConnectorAdminPort string
|
|
|
|
// OAuthRedirectURI is the registered OAuth2 redirect_uri (frontend callback URL).
|
|
// After a successful login, Hydra redirects here with the authorization code.
|
|
// The original protected URL is passed as the state parameter.
|
|
AdminOrigin string
|
|
Origin string
|
|
|
|
OAuthRedirectURI string
|
|
OAdminAuthRedirectURI string
|
|
|
|
Local bool
|
|
}
|
|
|
|
var instance *Config
|
|
var once sync.Once
|
|
|
|
func GetConfig() *Config {
|
|
once.Do(func() {
|
|
instance = &Config{}
|
|
})
|
|
return instance
|
|
}
|