synapse/handlers/auth.py
def delete_access_tokens_for_user(self, user_id, except_token_id=None,
                                      device_id=None):
        """Invalidate access tokens belonging to a user

        Args:
            user_id (str):  ID of user the tokens belong to
            except_token_id (str|None): access_token ID which should *not* be
                deleted
            device_id (str|None):  ID of device the tokens are associated with.
                If None, tokens associated with any device (or no device) will
                be deleted
        Returns:
            Deferred
        """
        tokens_and_devices = yield self.store.user_delete_access_tokens(
            user_id, except_token_id=except_token_id, device_id=device_id,
        )

        # see if any of our auth providers want to know about this
        for provider in self.password_providers:
            if hasattr(provider, "on_logged_out"):
                for token, token_id, device_id in tokens_and_devices:
                    yield provider.on_logged_out(
                        user_id=user_id,
                        device_id=device_id,
                        access_token=token,
                    )

        # delete pushers associated with the access tokens
        yield self.hs.get_pusherpool().remove_pushers_by_access_token(
            user_id, (token_id for _, token_id, _ in tokens_and_devices),
        )
Invalidate access tokens belonging to a user

        Args:
            user_id (str):  ID of user the tokens belong to
            except_token_id (str|None): access_token ID which should *not* be
                deleted
            device_id (str|None):  ID of device the tokens are associated with.
                If None, tokens associated with any device (or no device) will
                be deleted
        Returns:
            Deferred
        
Invalidate access tokens belonging to a user
Invalidate access tokens belonging to a user
def delete_access_tokens_for_user(self, user_id, except_token_id=None,
                                      device_id=None):
        tokens_and_devices = yield self.store.user_delete_access_tokens(
            user_id, except_token_id=except_token_id, device_id=device_id,
        )
        for provider in self.password_providers:
            if hasattr(provider, "on_logged_out"):
                for token, token_id, device_id in tokens_and_devices:
                    yield provider.on_logged_out(
                        user_id=user_id,
                        device_id=device_id,
                        access_token=token,
                    )
        yield self.hs.get_pusherpool().remove_pushers_by_access_token(
            user_id, (token_id for _, token_id, _ in tokens_and_devices),
        )
def delete_access_tokens_for_user ( self , user_id , except_token_id = None , device_id = None ) : tokens_and_devices = yield self . store . user_delete_access_tokens ( user_id , except_token_id = except_token_id , device_id = device_id , ) for provider in self . password_providers : if hasattr ( provider , "on_logged_out" ) : for token , token_id , device_id in tokens_and_devices : yield provider . on_logged_out ( user_id = user_id , device_id = device_id , access_token = token , ) yield self . hs . get_pusherpool ( ) . remove_pushers_by_access_token ( user_id , ( token_id for _ , token_id , _ in tokens_and_devices ) , )
Invalidate access tokens belonging to a user
Invalidate access tokens belonging to a user
"""Invalidate access tokens belonging to a user

        Args:
            user_id (str):  ID of user the tokens belong to
            except_token_id (str|None): access_token ID which should *not* be
                deleted
            device_id (str|None):  ID of device the tokens are associated with.
                If None, tokens associated with any device (or no device) will
                be deleted
        Returns:
            Deferred
        """ # see if any of our auth providers want to know about this # delete pushers associated with the access tokens
None
self
user_id
ID of user the tokens belong to
ID of user the tokens belong to
except_token_id
access_token ID which should *not* be
deleted
access_token ID which should * not * be deleted
device_id
ID of device the tokens are associated with.
If None, tokens associated with any device (or no device) will
be deleted
ID of device the tokens are associated with . If None tokens associated with any device ( or no device ) will be deleted