From faf4a0fcff312492a61710265f3631dc4abca17c Mon Sep 17 00:00:00 2001 From: Adminy <22717869+adminy@users.noreply.github.com> Date: Tue, 23 Jul 2024 22:50:14 +0100 Subject: [PATCH] only verify if scan file is present --- openconnect_sso/authenticator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openconnect_sso/authenticator.py b/openconnect_sso/authenticator.py index 2cbd113..ce47827 100644 --- a/openconnect_sso/authenticator.py +++ b/openconnect_sso/authenticator.py @@ -1,7 +1,7 @@ import attr import structlog from lxml import etree, objectify - +from pathlib import Path from openconnect_sso.saml_authenticator import authenticate_in_browser from openconnect_sso.ssl import requests, ssl_verification @@ -50,8 +50,8 @@ async def authenticate(self, display_mode): sso_token = await self._authenticate_in_browser( auth_request_response, display_mode ) - - self._complete_csd(auth_request_response) + if self._scan_file and Path(self._scan_file).is_file(): + self._complete_csd(auth_request_response) response = self._complete_authentication(auth_request_response, sso_token) if not isinstance(response, AuthCompleteResponse):