diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-26 15:43:35 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-26 15:43:35 +0200 |
| commit | 75aa163ccf407e9690f9ea0e548f8fed70073722 (patch) | |
| tree | dd68386a24c8c479149d094bb209fb0a78071c06 /exports | |
| parent | a5d33f95ba68263e6c0ca758c5b854530332d9ae (diff) | |
OAuth: Add a Cancel method
Diffstat (limited to 'exports')
| -rw-r--r-- | exports/exports.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/exports/exports.go b/exports/exports.go index aa6f5b6..d81f1ce 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -53,6 +53,14 @@ func ErrorToString(error error) string { return error.Error() } +//export CancelOAuth +func CancelOAuth() (*C.char) { + state := eduvpn.GetVPNState() + cancelErr := state.CancelOAuth() + cancelErrString := ErrorToString(cancelErr) + return C.CString(cancelErrString) +} + //export Connect func Connect(url *C.char) (*C.char, *C.char) { state := eduvpn.GetVPNState() |
