mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:04:50 -04:00
Convert Requester to attrs (#9586)
... because namedtuples suck Fix up a couple of other annotations to keep mypy happy.
This commit is contained in:
parent
1107214a1d
commit
a7a3790066
5 changed files with 37 additions and 35 deletions
|
@ -337,7 +337,8 @@ class AuthHandler(BaseHandler):
|
|||
user is too high to proceed
|
||||
|
||||
"""
|
||||
|
||||
if not requester.access_token_id:
|
||||
raise ValueError("Cannot validate a user without an access token")
|
||||
if self._ui_auth_session_timeout:
|
||||
last_validated = await self.store.get_access_token_last_validated(
|
||||
requester.access_token_id
|
||||
|
@ -1213,7 +1214,7 @@ class AuthHandler(BaseHandler):
|
|||
async def delete_access_tokens_for_user(
|
||||
self,
|
||||
user_id: str,
|
||||
except_token_id: Optional[str] = None,
|
||||
except_token_id: Optional[int] = None,
|
||||
device_id: Optional[str] = None,
|
||||
):
|
||||
"""Invalidate access tokens belonging to a user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue