From 65d2eed82dd2dcfbb05d278e1ac65b1d6d492fe5 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 11 Dec 2021 20:32:25 +0100 Subject: [PATCH] stagse/authenticator_webauthn: remove pydantic import Signed-off-by: Jens Langhammer --- authentik/stages/authenticator_webauthn/stage.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/authentik/stages/authenticator_webauthn/stage.py b/authentik/stages/authenticator_webauthn/stage.py index 61c054620..53a192626 100644 --- a/authentik/stages/authenticator_webauthn/stage.py +++ b/authentik/stages/authenticator_webauthn/stage.py @@ -53,9 +53,6 @@ class AuthenticatorWebAuthnChallengeResponse(ChallengeResponse): def validate_response(self, response: dict) -> dict: """Validate webauthn challenge response""" - # pylint: disable=no-name-in-module - from pydantic.error_wrappers import ValidationError as PydanticValidationError - challenge = self.request.session["challenge"] try: @@ -65,7 +62,7 @@ class AuthenticatorWebAuthnChallengeResponse(ChallengeResponse): expected_rp_id=get_rp_id(self.request), expected_origin=get_origin(self.request), ) - except (InvalidRegistrationResponse, PydanticValidationError) as exc: + except InvalidRegistrationResponse as exc: LOGGER.warning("registration failed", exc=exc) raise ValidationError(f"Registration failed. Error: {exc}")