diff options
author | Andrej Shadura <andrewsh@debian.org> | 2020-08-12 09:05:10 +0200 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2020-08-12 09:05:10 +0200 |
commit | e59dea7b4cbe3528d78b694713505a5da00996b1 (patch) | |
tree | 4b0adbc710f5bdf2260fe3ea925dfd9d53cc0d56 /synapse/handlers/auth.py | |
parent | 16f1d7d5fb08f51a3547391873b481d40b4b8c92 (diff) |
New upstream version 1.18.0
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index a162392e..c7d921c2 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import inspect import logging import time import unicodedata @@ -863,11 +864,15 @@ class AuthHandler(BaseHandler): # see if any of our auth providers want to know about this for provider in self.password_providers: if hasattr(provider, "on_logged_out"): - await provider.on_logged_out( + # This might return an awaitable, if it does block the log out + # until it completes. + result = provider.on_logged_out( user_id=str(user_info["user"]), device_id=user_info["device_id"], access_token=access_token, ) + if inspect.isawaitable(result): + await result # delete pushers associated with this access token if user_info["token_id"] is not None: |