backend.get_auth_cache_timeout now takes options as an argument

This commit is contained in:
Ezri Brimhall 2025-09-02 16:52:38 -06:00
parent adb150ef55
commit dcaa0f3770
Signed by: ezri
GPG Key ID: 058A78E5680C6F24
2 changed files with 4 additions and 2 deletions

View File

@ -186,7 +186,7 @@ class ConnectionInterface(ServiceInterface):
daemon.notify(f"STATUS=Authenticating to {self._name}")
self.logger.info(f"Authenticating to VPN {self._name}...")
auth = await self._backend.authenticate(self._options)
cache_timeout = self._backend.get_auth_cache_timeout()
cache_timeout = self._backend.get_auth_cache_timeout(self._options)
if cache_timeout is None:
pass
elif cache_timeout == timedelta(0):

View File

@ -114,7 +114,9 @@ class ConnectionBase(abc.ABC):
self._manager = manager
self._connection = connection
def get_auth_cache_timeout(self) -> datetime.timedelta | None:
def get_auth_cache_timeout(
self, options: dict[str, Variant]
) -> datetime.timedelta | None:
"""
Get the timeout for the authdata cache.