mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-17 18:38:18 -05:00
74 lines
2.5 KiB
Go
74 lines
2.5 KiB
Go
package config
|
|
|
|
import (
|
|
"path"
|
|
|
|
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
|
)
|
|
|
|
func DefaultConfig() *Config {
|
|
return &Config{
|
|
Debug: Debug{
|
|
Addr: "127.0.0.1:9134",
|
|
},
|
|
HTTP: HTTP{
|
|
Addr: "127.0.0.1:9130",
|
|
Root: "/",
|
|
Namespace: "com.owncloud.web",
|
|
TLSCert: path.Join(defaults.BaseDataPath(), "idp", "server.crt"),
|
|
TLSKey: path.Join(defaults.BaseDataPath(), "idp", "server.key"),
|
|
TLS: false,
|
|
},
|
|
Service: Service{
|
|
Name: "idp",
|
|
},
|
|
Asset: Asset{},
|
|
IDP: Settings{
|
|
Iss: "https://localhost:9200",
|
|
IdentityManager: "ldap",
|
|
URIBasePath: "",
|
|
SignInURI: "",
|
|
SignedOutURI: "",
|
|
AuthorizationEndpointURI: "",
|
|
EndsessionEndpointURI: "",
|
|
Insecure: false,
|
|
TrustedProxy: nil,
|
|
AllowScope: nil,
|
|
AllowClientGuests: false,
|
|
AllowDynamicClientRegistration: false,
|
|
EncryptionSecretFile: "",
|
|
Listen: "",
|
|
IdentifierClientDisabled: true,
|
|
IdentifierClientPath: path.Join(defaults.BaseDataPath(), "idp"),
|
|
IdentifierRegistrationConf: path.Join(defaults.BaseDataPath(), "idp", "identifier-registration.yaml"),
|
|
IdentifierScopesConf: "",
|
|
IdentifierDefaultBannerLogo: "",
|
|
IdentifierDefaultSignInPageText: "",
|
|
IdentifierDefaultUsernameHintText: "",
|
|
SigningKid: "",
|
|
SigningMethod: "PS256",
|
|
SigningPrivateKeyFiles: nil,
|
|
ValidationKeysPath: "",
|
|
CookieBackendURI: "",
|
|
CookieNames: nil,
|
|
AccessTokenDurationSeconds: 60 * 10, // 10 minutes
|
|
IDTokenDurationSeconds: 60 * 60, // 1 hour
|
|
RefreshTokenDurationSeconds: 60 * 60 * 24 * 365 * 3, // 1 year
|
|
DyamicClientSecretDurationSeconds: 0,
|
|
},
|
|
Ldap: Ldap{
|
|
URI: "ldap://localhost:9125",
|
|
BindDN: "cn=idp,ou=sysusers,dc=ocis,dc=test",
|
|
BindPassword: "idp",
|
|
BaseDN: "ou=users,dc=ocis,dc=test",
|
|
Scope: "sub",
|
|
LoginAttribute: "cn",
|
|
EmailAttribute: "mail",
|
|
NameAttribute: "sn",
|
|
UUIDAttribute: "uid",
|
|
UUIDAttributeType: "text",
|
|
Filter: "(objectClass=posixaccount)",
|
|
},
|
|
}
|
|
}
|