Add config and checks for trusted ID servers (#206)

* Add config for trusted ID servers

* Add new error

* Implement check for trusted ID server

* Complete unfinished comment

* Make comment more explicit in the config file

* Use go standard errors in membership.go

* Use standard errors instead of JSON responses in threepid

* Doc errors

* Remove unused parameter
This commit is contained in:
Brendan Abolivier 2017-09-11 19:18:19 +01:00 committed by GitHub
parent 28346b39e8
commit f1fce55697
8 changed files with 175 additions and 80 deletions

View file

@ -70,6 +70,10 @@ type Dendrite struct {
// by remote servers.
// Defaults to 24 hours.
KeyValidityPeriod time.Duration `yaml:"key_validity_period"`
// List of domains that the server will trust as identity servers to
// verify third-party identifiers.
// Defaults to an empty array.
TrustedIDServers []string `yaml:"trusted_third_party_id_servers"`
} `yaml:"matrix"`
// The configuration specific to the media repostitory.
@ -273,6 +277,10 @@ func (config *Dendrite) setDefaults() {
config.Matrix.KeyValidityPeriod = 24 * time.Hour
}
if config.Matrix.TrustedIDServers == nil {
config.Matrix.TrustedIDServers = []string{}
}
if config.Media.MaxThumbnailGenerators == 0 {
config.Media.MaxThumbnailGenerators = 10
}