Added auth cache support
This commit is contained in:
parent
11f13a7341
commit
2ed041695f
@ -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."""
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user