summaryrefslogtreecommitdiff
path: root/wrappers/python/eduvpn_common
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-06 16:55:36 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit6cdcb450a667e0f730dc4d349efd216e11b57144 (patch)
tree1e6d0b30cdc13f023d1139a5f430d8b3b8cba036 /wrappers/python/eduvpn_common
parent1ef4079c2b0203d439ed58b73c440d1ab9f6918b (diff)
Exports + Python: Delete cookie but add orgid in set_secure_location
Diffstat (limited to 'wrappers/python/eduvpn_common')
-rw-r--r--wrappers/python/eduvpn_common/loader.py2
-rw-r--r--wrappers/python/eduvpn_common/main.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py
index 7da159c..51286d2 100644
--- a/wrappers/python/eduvpn_common/loader.py
+++ b/wrappers/python/eduvpn_common/loader.py
@@ -107,7 +107,7 @@ def initialize_functions(lib: CDLL) -> None:
lib.CookieCancel.argtypes, lib.CookieCancel.restype = [c_int], c_void_p
lib.CookieDelete.argtypes, lib.CookieDelete.restype = [c_int], c_void_p
lib.SetSecureLocation.argtypes, lib.SetSecureLocation.restype = [
- c_int,
+ c_char_p,
c_char_p,
], c_void_p
lib.SetSupportWireguard.argtypes, lib.SetSupportWireguard.restype = [
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py
index d1b3f48..0daf0b6 100644
--- a/wrappers/python/eduvpn_common/main.py
+++ b/wrappers/python/eduvpn_common/main.py
@@ -278,15 +278,16 @@ class EduVPN(object):
if profile_err:
forwardError(profile_err)
- def set_secure_location(self, country_code: str) -> None:
+ def set_secure_location(self, org_id: str, country_code: str) -> None:
"""Set the secure location
+ :param org_id: str: The organisation ID
:param country_code: str: The country code of the new location
:raises WrappedError: An error by the Go library
"""
# Set the location by country code
- location_err = self.go_cookie_function(self.lib.SetSecureLocation, country_code)
+ location_err = self.go_function(self.lib.SetSecureLocation, org_id, country_code)
# If there is a location event, set it so that the wait callback finishes
# And so that the Go code can move to the next state