diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2024-05-08 11:49:19 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-05-08 13:54:45 +0000 |
| commit | 9ce4e4458794290755c68a180125acc68ab84038 (patch) | |
| tree | d4211e55bd77d07938651619733c7b435597d53a /wrappers/python/eduvpn_common/main.py | |
| parent | 580f94b4023fba35ab2f58d2e6d7b3b7c40ec139 (diff) | |
Server: Add a way to pass OAuth start time
Diffstat (limited to 'wrappers/python/eduvpn_common/main.py')
| -rw-r--r-- | wrappers/python/eduvpn_common/main.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py index 84ae9ab..4582c8d 100644 --- a/wrappers/python/eduvpn_common/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -1,7 +1,7 @@ import ctypes import json from enum import IntEnum -from typing import Any, Callable, Iterator +from typing import Any, Callable, Iterator, Optional from eduvpn_common.event import EventHandler from eduvpn_common.loader import initialize_functions, load_lib @@ -151,16 +151,17 @@ class EduVPN(object): if register_err: forwardError(register_err) - def add_server(self, _type: ServerType, _id: str, ni: bool = False) -> None: + def add_server(self, _type: ServerType, _id: str, ot: Optional[int] = None) -> None: """Add a server :param _type: ServerType: The type of server e.g. SERVER.INSTITUTE_ACCESS :param _id: str: The identifier of the server, e.g. "https://vpn.example.com/" - :param ni: bool: Whether the server should be added non interactively, meaning no callbacks + :param ot: Optional[int]: The time when OAuth was last started. + if != None the server is added without any interactivity :raises WrappedError: An error by the Go library """ - add_err = self.go_cookie_function(self.lib.AddServer, int(_type), _id, ni) + add_err = self.go_cookie_function(self.lib.AddServer, int(_type), _id, ot) if add_err: forwardError(add_err) |
