diff options
Diffstat (limited to 'oauth/index.php')
-rwxr-xr-x | oauth/index.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oauth/index.php b/oauth/index.php index 0a6ce71..1ebf7b7 100755 --- a/oauth/index.php +++ b/oauth/index.php @@ -10,7 +10,7 @@ if (!isset($_GET['code'])) { $appdata = json_decode(file_get_contents("/mnt/familine/private/app.json"), true);
-$crl = curl_init('https://' . $_CONFIG["Global"]["federation"]. '/auth/realms/Familine/protocol/openid-connect/token');
+$crl = curl_init('https://' . $_CONFIG["Global"]["federation"]. '/hub/api/rest/oauth2/token');
curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($crl, CURLINFO_HEADER_OUT, true);
curl_setopt($crl, CURLOPT_POST, true);
@@ -29,7 +29,7 @@ $result = json_decode($result, true); curl_close($crl);
if (isset($result["access_token"])) {
- $crl = curl_init('https://' . $_CONFIG["Global"]["federation"]. '/auth/realms/Familine/protocol/openid-connect/userinfo');
+ $crl = curl_init('https://' . $_CONFIG["Global"]["federation"]. '/hub/api/rest/users/me');
curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($crl, CURLINFO_HEADER_OUT, true);
curl_setopt($crl, CURLOPT_HTTPHEADER, [
@@ -49,5 +49,5 @@ if (isset($result["access_token"])) { file_put_contents("/mnt/familine/private/tokens/" . $token, json_encode($result));
setcookie("FL_SESSION_TOKEN", $token, 0, "/", "." . $_CONFIG["Global"]["cdn"], true, true);
- header("Location: https://auth.familine.minteck.org/auth/realms/Familine/X-Familine-PersistentSession/?r=" . urlencode($_GET['r']));
+ header("Location: " . $_GET['r']);
}
\ No newline at end of file |