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

@ -241,7 +241,7 @@ func Setup(
r0mux.Handle("/account/3pid",
common.MakeAuthAPI("account_3pid", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
return readers.CheckAndSave3PIDAssociation(req, accountDB, device)
return readers.CheckAndSave3PIDAssociation(req, accountDB, device, cfg)
}),
).Methods("POST", "OPTIONS")
@ -253,7 +253,7 @@ func Setup(
r0mux.Handle("/{path:(?:account/3pid|register)}/email/requestToken",
common.MakeAPI("account_3pid_request_token", func(req *http.Request) util.JSONResponse {
return readers.RequestEmailToken(req, accountDB)
return readers.RequestEmailToken(req, accountDB, cfg)
}),
).Methods("POST", "OPTIONS")