summaryrefslogtreecommitdiff
path: root/exports/exports.go
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 /exports/exports.go
parent1ef4079c2b0203d439ed58b73c440d1ab9f6918b (diff)
Exports + Python: Delete cookie but add orgid in set_secure_location
Diffstat (limited to 'exports/exports.go')
-rw-r--r--exports/exports.go16
1 files changed, 5 insertions, 11 deletions
diff --git a/exports/exports.go b/exports/exports.go
index 5c36446..c7d4b8c 100644
--- a/exports/exports.go
+++ b/exports/exports.go
@@ -615,13 +615,11 @@ func SetProfileID(data *C.char) *C.char {
//
// This MUST only be called if the user/client wishes to manually set a location instead of the common lib asking for one using a transition
//
-// Because this does network requests to initialize the location, there is a cookie again :)
-//
-// `c` is the Cookie that needs to be passed. To create a cookie, first call `CookieNew`
-// `Data` is the location ID
+// `orgID` is the organisation ID for the secure internet server
+// `cc` is the location ID/country code
//
// It returns an error if unsuccessful.
-// Example Input: ```SetSecureLocation("nl")```
+// Example Input: ```SetSecureLocation("http://idp.geant.org/", "nl")```
//
// Example Output:
//
@@ -633,16 +631,12 @@ func SetProfileID(data *C.char) *C.char {
// }
//
//export SetSecureLocation
-func SetSecureLocation(c C.uintptr_t, data *C.char) *C.char {
+func SetSecureLocation(orgID *C.char, cc *C.char) *C.char {
state, stateErr := getVPNState()
if stateErr != nil {
return getCError(stateErr)
}
- ck, err := getCookie(c)
- if err != nil {
- return getCError(err)
- }
- locationErr := state.SetSecureLocation(ck, C.GoString(data))
+ locationErr := state.SetSecureLocation(C.GoString(orgID), C.GoString(cc))
return getCError(locationErr)
}