Merge pull request #2624 from matrix-org/rav/password_provider_notify_logout

Notify auth providers on logout
This commit is contained in:
David Baker 2017-11-02 10:55:17 +00:00 committed by GitHub
commit b19d9e2174
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 7 deletions

View file

@ -87,3 +87,13 @@ Password auth provider classes may optionally provide the following methods.
The method should return a Twisted ``Deferred`` object, which resolves to
``True`` if authentication is successful, and ``False`` if not.
``someprovider.on_logged_out``\(*user_id*, *device_id*, *access_token*)
This method, if implemented, is called when a user logs out. It is passed
the qualified user ID, the ID of the deactivated device (if any: access
tokens are occasionally created without an associated device ID), and the
(now deactivated) access token.
It may return a Twisted ``Deferred`` object; the logout request will wait
for the deferred to complete but the result is ignored.