summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-12 20:41:11 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit7c2d6467bd4348ffec5adc0e7e0978d23350e178 (patch)
tree9beba3094e545113d05e99b8cd9e5c26b675bef9 /client
parent37f38b166aaaeb99f444abea817f8192ff77dd2a (diff)
Client: Remove unused redirect URI file
Diffstat (limited to 'client')
-rw-r--r--client/redirect.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/client/redirect.go b/client/redirect.go
deleted file mode 100644
index 9782d66..0000000
--- a/client/redirect.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package client
-
-// customRedirects supplies redirect values that should be handled by the app itself
-// here we hardcode the redirect values that we should use in the OAuth requests
-// these values were taken from https://git.sr.ht/~fkooman/vpn-user-portal/tree/v3/item/src/OAuth/VpnClientDb.php
-var customRedirects = map[string]string{
- "org.letsconnect-vpn.app.ios": "org.letsconnect-vpn.app.ios:/api/callback",
- // TODO: change to org.letsconnect-vpn.app.android:/api/callback once most servers have commit:
- // https://git.sr.ht/~fkooman/vpn-user-portal/commit/9c0463103c61a55668fff800e83f77a7b6d26e4f#src/OAuth/VpnClientDb.php
- "org.letsconnect-vpn.app.android": "org.letsconnect-vpn.app:/api/callback",
- "org.eduvpn.app.ios": "org.eduvpn.app.ios:/api/callback",
- // TODO: change to org.eduvpn.app.android:/api/callback once most servers have commit:
- // https://git.sr.ht/~fkooman/vpn-user-portal/commit/9c0463103c61a55668fff800e83f77a7b6d26e4f#src/OAuth/VpnClientDb.php
- "org.eduvpn.app.android": "org.eduvpn.app:/api/callback",
- "org.govvpn.app.ios": "org.govvpn.app.ios:/api/callback",
- "org.govvpn.app.android": "org.govvpn.app.android:/api/callback",
-}
-
-// CustomRedirect returns the custom redirect string for a clientID `cid`
-// Empty string if none is defined or one is defined but is empty.
-// In both empty string cases, eduvpn-common handles the redirects as 127.0.0.1 local server redirects
-// If a non-empty string is returned, the redirect should be handled by the client and we only use the redirect URI value in our OAuth requests
-func CustomRedirect(cid string) string {
- v, ok := customRedirects[cid]
- if !ok {
- return ""
- }
- return v
-}