mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 09:13:09 -06:00
Switch to deprecated Identity API v1 - no authentication required
This commit is contained in:
parent
15e6056540
commit
7d9304ea63
|
|
@ -356,7 +356,7 @@ func validateEmailIdentity(
|
||||||
cred *threepidCreds,
|
cred *threepidCreds,
|
||||||
) *util.JSONResponse {
|
) *util.JSONResponse {
|
||||||
url := fmt.Sprintf(
|
url := fmt.Sprintf(
|
||||||
"https://%s/_matrix/identity/v2/3pid/getValidated3pid",
|
"https://%s/_matrix/identity/api/v1/3pid/getValidated3pid",
|
||||||
cred.IdServer)
|
cred.IdServer)
|
||||||
tr := &http.Transport{
|
tr := &http.Transport{
|
||||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||||
|
|
@ -1156,14 +1156,13 @@ func requestEmailTokenFromIdServer(
|
||||||
ctx,
|
ctx,
|
||||||
"POST",
|
"POST",
|
||||||
fmt.Sprintf(
|
fmt.Sprintf(
|
||||||
"https://%s/_matrix/identity/v2/validate/email/requestToken",
|
"https://%s/_matrix/identity/api/v1/validate/email/requestToken",
|
||||||
idServer),
|
idServer),
|
||||||
&b)
|
&b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.GetLogger(ctx).WithError(err).Error("http.NewRequestWithContext failed")
|
util.GetLogger(ctx).WithError(err).Error("http.NewRequestWithContext failed")
|
||||||
return jsonerror.InternalServerError()
|
return jsonerror.InternalServerError()
|
||||||
}
|
}
|
||||||
idReq.Header.Add("Authentication", "Bearer "+idAccessToken)
|
|
||||||
idReq.Header.Add("Content-Type", "application/json")
|
idReq.Header.Add("Content-Type", "application/json")
|
||||||
idResp, err := client.Do(idReq)
|
idResp, err := client.Do(idReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue