Added auth cache support

This commit is contained in:
Ezri Brimhall 2025-09-02 16:52:08 -06:00
parent 11f13a7341
commit 2ed041695f
Signed by: ezri
GPG Key ID: 058A78E5680C6F24

View File

@ -24,6 +24,7 @@ import base64
import re
import psutil
import signal
from datetime import timedelta
class LoginTarget(StrEnum):
@ -85,6 +86,13 @@ class GlobalProtectConnection(
logger = logging.getLogger(f"{__name__}.GlobalProtectConnection")
def get_auth_cache_timeout(self, options: dict[str, Variant]) -> timedelta | None:
"""Get the timeout for the authdata cache."""
timeout = options.get("auth_cache_timeout")
if timeout is None:
return None
return timedelta(seconds=timeout.value)
async def _prelogin(self, options: dict[str, Variant]):
"""Perform prelogin request."""