mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 14:06:02 -04:00
Completely replace fallback auth for C/S V2:
* Now only the auth part goes to fallback, not the whole operation * Auth fallback is a normal API endpoint, not a static page * Params like the recaptcha pubkey can just live in the config Involves a little engineering on JsonResource so its servlets aren't always forced to return JSON. I should document this more, in fact I'll do that now.
This commit is contained in:
parent
f129ee1e18
commit
e9c908ebc0
6 changed files with 280 additions and 26 deletions
|
@ -170,9 +170,12 @@ class JsonResource(HttpServer, resource.Resource):
|
|||
request.method, request.path
|
||||
)
|
||||
|
||||
code, response = yield callback(request, *args)
|
||||
callback_return = yield callback(request, *args)
|
||||
if callback_return is not None:
|
||||
code, response = callback_return
|
||||
|
||||
self._send_response(request, code, response)
|
||||
|
||||
self._send_response(request, code, response)
|
||||
response_timer.inc_by(
|
||||
self.clock.time_msec() - start, request.method, servlet_classname
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue