sources/oauth: don't try to load azure AD user ID as UUID

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-14 09:33:44 +02:00
parent a20f552bcf
commit 3a700a449a

View file

@ -1,6 +1,5 @@
"""AzureAD OAuth2 Views"""
from typing import Any, Optional
from uuid import UUID
from requests.exceptions import RequestException
from structlog.stdlib import get_logger
@ -49,12 +48,6 @@ class AzureADOAuthCallback(OAuthCallback):
client_class = AzureADClient
def get_user_id(self, info: dict[str, Any]) -> Optional[str]:
try:
return str(UUID(info.get("id")).int)
except TypeError:
return None
def get_user_enroll_context(
self,
info: dict[str, Any],