mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-29 07:28:55 +03:00
Use v3 endpoints for fallback auth (Matrix 1.1) (#12019)
This commit is contained in:
parent
3070af4809
commit
d7cb0dcbaa
2 changed files with 5 additions and 4 deletions
1
changelog.d/12019.misc
Normal file
1
changelog.d/12019.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Use Matrix v1.1 endpoints (`/_matrix/client/v3/auth/...`) in fallback auth HTML forms.
|
|
@ -62,7 +62,7 @@ class AuthRestServlet(RestServlet):
|
||||||
if stagetype == LoginType.RECAPTCHA:
|
if stagetype == LoginType.RECAPTCHA:
|
||||||
html = self.recaptcha_template.render(
|
html = self.recaptcha_template.render(
|
||||||
session=session,
|
session=session,
|
||||||
myurl="%s/r0/auth/%s/fallback/web"
|
myurl="%s/v3/auth/%s/fallback/web"
|
||||||
% (CLIENT_API_PREFIX, LoginType.RECAPTCHA),
|
% (CLIENT_API_PREFIX, LoginType.RECAPTCHA),
|
||||||
sitekey=self.hs.config.captcha.recaptcha_public_key,
|
sitekey=self.hs.config.captcha.recaptcha_public_key,
|
||||||
)
|
)
|
||||||
|
@ -74,7 +74,7 @@ class AuthRestServlet(RestServlet):
|
||||||
self.hs.config.server.public_baseurl,
|
self.hs.config.server.public_baseurl,
|
||||||
self.hs.config.consent.user_consent_version,
|
self.hs.config.consent.user_consent_version,
|
||||||
),
|
),
|
||||||
myurl="%s/r0/auth/%s/fallback/web"
|
myurl="%s/v3/auth/%s/fallback/web"
|
||||||
% (CLIENT_API_PREFIX, LoginType.TERMS),
|
% (CLIENT_API_PREFIX, LoginType.TERMS),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class AuthRestServlet(RestServlet):
|
||||||
# Authentication failed, let user try again
|
# Authentication failed, let user try again
|
||||||
html = self.recaptcha_template.render(
|
html = self.recaptcha_template.render(
|
||||||
session=session,
|
session=session,
|
||||||
myurl="%s/r0/auth/%s/fallback/web"
|
myurl="%s/v3/auth/%s/fallback/web"
|
||||||
% (CLIENT_API_PREFIX, LoginType.RECAPTCHA),
|
% (CLIENT_API_PREFIX, LoginType.RECAPTCHA),
|
||||||
sitekey=self.hs.config.captcha.recaptcha_public_key,
|
sitekey=self.hs.config.captcha.recaptcha_public_key,
|
||||||
error=e.msg,
|
error=e.msg,
|
||||||
|
@ -143,7 +143,7 @@ class AuthRestServlet(RestServlet):
|
||||||
self.hs.config.server.public_baseurl,
|
self.hs.config.server.public_baseurl,
|
||||||
self.hs.config.consent.user_consent_version,
|
self.hs.config.consent.user_consent_version,
|
||||||
),
|
),
|
||||||
myurl="%s/r0/auth/%s/fallback/web"
|
myurl="%s/v3/auth/%s/fallback/web"
|
||||||
% (CLIENT_API_PREFIX, LoginType.TERMS),
|
% (CLIENT_API_PREFIX, LoginType.TERMS),
|
||||||
error=e.msg,
|
error=e.msg,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue