summaryrefslogtreecommitdiff
path: root/docs/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/api')
-rw-r--r--docs/src/api/functiondocs.md23
-rw-r--r--docs/src/api/statemachine.md2
2 files changed, 21 insertions, 4 deletions
diff --git a/docs/src/api/functiondocs.md b/docs/src/api/functiondocs.md
index 1f31871..7937196 100644
--- a/docs/src/api/functiondocs.md
+++ b/docs/src/api/functiondocs.md
@@ -86,7 +86,15 @@ The following state callbacks are mandatory to handle:
- OAUTH_STARTED: This indicates that the OAuth procedure has been started,
it returns the URL as the data. The client should open the webbrowser
- with this URL and continue the authorization process.
+ with this URL and continue the authorization process. Note: For mobile
+ platforms this returns a Cookie and data (json: {"cookie": x, "data":
+ url}). This `url` should also be opened in the browser like desktop
+ platforms. But these platforms also need to reply to the library
+ to give back the full authorization code URI with CookieReply(x,
+ uri) that the apps get back when the user clicks approve. For this,
+ apps need to register an app url or sorts. For the valid values
+ for app URLs, see the redirect URIs for mobile platforms here
+ https://git.sr.ht/~fkooman/vpn-user-portal/tree/v3/item/src/OAuth/VpnClientDb.php
Example Input (3=custom server): ```AddServer(mycookie, 3,
"https://demo.eduvpn.nl", 0)```
@@ -483,8 +491,17 @@ So a client would:
### OAUTH_STARTED
-This indicates that the OAuth procedure has been started, it returns the URL
-as the data.
+ - OAUTH_STARTED: This indicates that the OAuth procedure has been started,
+ it returns the URL as the data. The client should open the webbrowser
+ with this URL and continue the authorization process. Note: For mobile
+ platforms this returns a Cookie and data (json: {"cookie": x, "data":
+ url}). This `url` should also be opened in the browser like desktop
+ platforms. But these platforms also need to reply to the library
+ to give back the full authorization code URI with CookieReply(x,
+ uri) that the apps get back when the user clicks approve. For this,
+ apps need to register an app url or sorts. For the valid values
+ for app URLs, see the redirect URIs for mobile platforms here
+ https://git.sr.ht/~fkooman/vpn-user-portal/tree/v3/item/src/OAuth/VpnClientDb.php
The client should open the webbrowser with this URL and continue the
authorization process. This is only called if authorization needs to be
diff --git a/docs/src/api/statemachine.md b/docs/src/api/statemachine.md
index 29c0549..2c86d93 100644
--- a/docs/src/api/statemachine.md
+++ b/docs/src/api/statemachine.md
@@ -171,7 +171,7 @@ For the explanation of what all the different states mean, see the [client docum
In eduvpn-common, there are certain states that require attention from the client.
-- OAuth Started: A state that must be handled by the client. How a client can 'handle' this state, we will see in the next section. In this state, the client must open the webbrowser with the authorization URL to complete to OAuth process
+- OAuth Started: A state that must be handled by the client. How a client can 'handle' this state, we will see in the next section. In this state, the client must open the webbrowser with the authorization URL to complete to OAuth process. Note that on mobile platforms, you also need to reply with the authorization URI as these platforms do not support a local callback server using 127.0.0.1
- Ask Profile: The state that asks for a profile selection to the client. Reply to this state by using a "cookie" and the CookieReply function. What this means will be discussed in the Python client example too
- Ask Location: Same for ask profile but for selecting a secure internet location. Only called if one must be chosen, e.g. due to a selection that is no longer valid