summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-12-31 13:40:57 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-12-31 13:40:57 +0000
commitb90b34744ab6292963f74509ecf4b4e553fc4085 (patch)
tree339e2c431c558f274ac25bcdd49c7009802259b9 /synapse/handlers/auth.py
parentMerge commit '88e1d0c52' into anoa/dinsic_release_1_23_1 (diff)
parentMerge pull request #8678 from matrix-org/rav/fix_frozen_events (diff)
downloadsynapse-b90b34744ab6292963f74509ecf4b4e553fc4085.tar.xz
Merge commit 'c97da1e45' into anoa/dinsic_release_1_23_1
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r--synapse/handlers/auth.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py

index dd14ab69d7..276594f3d9 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py
@@ -18,10 +18,20 @@ import logging import time import unicodedata import urllib.parse -from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union +from typing import ( + TYPE_CHECKING, + Any, + Callable, + Dict, + Iterable, + List, + Optional, + Tuple, + Union, +) import attr -import bcrypt # type: ignore[import] +import bcrypt import pymacaroons from synapse.api.constants import LoginType @@ -49,6 +59,9 @@ from synapse.util.threepids import canonicalise_email from ._base import BaseHandler +if TYPE_CHECKING: + from synapse.app.homeserver import HomeServer + logger = logging.getLogger(__name__) @@ -149,11 +162,7 @@ class SsoLoginExtraAttributes: class AuthHandler(BaseHandler): SESSION_EXPIRE_MS = 48 * 60 * 60 * 1000 - def __init__(self, hs): - """ - Args: - hs (synapse.server.HomeServer): - """ + def __init__(self, hs: "HomeServer"): super().__init__(hs) self.checkers = {} # type: Dict[str, UserInteractiveAuthChecker]