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 /docs/src | |
| parent | 580f94b4023fba35ab2f58d2e6d7b3b7c40ec139 (diff) | |
Server: Add a way to pass OAuth start time
Diffstat (limited to 'docs/src')
| -rw-r--r-- | docs/src/api/functiondocs.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/src/api/functiondocs.md b/docs/src/api/functiondocs.md index 42013ce..58134f7 100644 --- a/docs/src/api/functiondocs.md +++ b/docs/src/api/functiondocs.md @@ -56,7 +56,7 @@ the whole UI around it. The SetState and InState functions are useful for this ## AddServer Signature: ```go -func AddServer(c C.uintptr_t, _type C.int, id *C.char, ni C.int) *C.char +func AddServer(c C.uintptr_t, _type C.int, id *C.char, ot *C.longlong) *C.char ``` AddServer adds a server to the eduvpn-common server list `c` is the cookie that is used for cancellation. Create a cookie first with CookieNew. @@ -76,8 +76,11 @@ in types/server/server.go Type `ni` stands for non-interactive. If non-zero, any state transitions will not be run. -This `ni` flag is useful for preprovisioned servers. For normal usage, -you want to set this to zero (meaning: False) +This `ot` flag is useful for preprovisioned servers; set this to non-null to +non-interactively add a server. This flag represents the Unix time OAuth was +last triggered, if the server needs to be added non-interactively but there +is no token structure, set this to zero (integer) or the current Unix time. +This value will be overwritten once OAuth is triggered. If the server cannot be added it returns the error as types/error/error.go Error. Note that the server is removed when an error has occured |
