mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 02:53:52 +00:00
typing: Add assertions for authentication.
Signed-off-by: Zixuan James Li <359101898@qq.com>
This commit is contained in:
committed by
Tim Abbott
parent
c572d9be5a
commit
4c6f2ae7be
@@ -1335,9 +1335,10 @@ class ExternalAuthResult:
|
||||
# more customized error messages for those unlikely races, but
|
||||
# it's likely not worth implementing.
|
||||
realm = get_realm(data["subdomain"])
|
||||
self.user_profile = authenticate(
|
||||
username=data["email"], realm=realm, use_dummy_backend=True
|
||||
)
|
||||
auth_result = authenticate(username=data["email"], realm=realm, use_dummy_backend=True)
|
||||
if auth_result is not None:
|
||||
assert isinstance(auth_result, UserProfile)
|
||||
self.user_profile = auth_result
|
||||
|
||||
class InvalidTokenError(Exception):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user