def deauthenticate(token): """ Logout the current user :param token Current web token :return: """ request_token = web_utils.get_token_from_request() # Only allow deletion of a web token if the token belongs to the current user if request_token == token: user_service.logout(token=g.auth['loopback_token']) return '', 204
def test_user_logout_success(self): """With correct values, is a valid user logged out?""" self.assertTrue(user_service.logout(self.loopback_token) is None)