Added auth cache support
This commit is contained in:
@@ -24,6 +24,7 @@ import base64
|
|||||||
import re
|
import re
|
||||||
import psutil
|
import psutil
|
||||||
import signal
|
import signal
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
|
||||||
class LoginTarget(StrEnum):
|
class LoginTarget(StrEnum):
|
||||||
@@ -85,6 +86,13 @@ class GlobalProtectConnection(
|
|||||||
|
|
||||||
logger = logging.getLogger(f"{__name__}.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]):
|
async def _prelogin(self, options: dict[str, Variant]):
|
||||||
"""Perform prelogin request."""
|
"""Perform prelogin request."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user