mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 16:52:14 -04:00
Allow password_auth_providers to return a callback
... so that they have a way to record access tokens.
This commit is contained in:
parent
846a94fbc9
commit
4c8f94ac94
3 changed files with 17 additions and 6 deletions
|
@ -219,7 +219,7 @@ class LoginRestServlet(ClientV1RestServlet):
|
|||
raise SynapseError(400, "User identifier is missing 'user' key")
|
||||
|
||||
auth_handler = self.auth_handler
|
||||
canonical_user_id = yield auth_handler.validate_login(
|
||||
canonical_user_id, callback = yield auth_handler.validate_login(
|
||||
identifier["user"],
|
||||
login_submission,
|
||||
)
|
||||
|
@ -238,6 +238,9 @@ class LoginRestServlet(ClientV1RestServlet):
|
|||
"device_id": device_id,
|
||||
}
|
||||
|
||||
if callback is not None:
|
||||
yield callback(result)
|
||||
|
||||
defer.returnValue((200, result))
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue