aboutsummaryrefslogtreecommitdiff
path: root/admin/callback/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/callback/index.php')
-rw-r--r--admin/callback/index.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/callback/index.php b/admin/callback/index.php
index 5052369..f938621 100644
--- a/admin/callback/index.php
+++ b/admin/callback/index.php
@@ -8,7 +8,7 @@ if (!isset($_GET['code'])) {
$appdata = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/admin/private/app.json"), true);
-$crl = curl_init('https://jetbrains.minteck.ro.lt:1024/hub/hub/api/rest/oauth2/token');
+$crl = curl_init('https://account.minteck.org/hub/hub/api/rest/oauth2/token');
curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($crl, CURLINFO_HEADER_OUT, true);
curl_setopt($crl, CURLOPT_POST, true);
@@ -17,7 +17,7 @@ curl_setopt($crl, CURLOPT_HTTPHEADER, [
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json"
]);
-curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode("https://minteck.ro.lt/admin/callback") . "&code=" . $_GET['code']);
+curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode("https://minteck.org/admin/callback") . "&code=" . $_GET['code']);
$result = curl_exec($crl);
$result = json_decode($result, true);
@@ -25,7 +25,7 @@ $result = json_decode($result, true);
curl_close($crl);
if (isset($result["access_token"])) {
- $crl = curl_init('https://jetbrains.minteck.ro.lt:1024/hub/hub/api/rest/users/me');
+ $crl = curl_init('https://account.minteck.org/hub/hub/api/rest/users/me');
curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($crl, CURLINFO_HEADER_OUT, true);
curl_setopt($crl, CURLOPT_HTTPHEADER, [
@@ -46,7 +46,7 @@ if (isset($result["access_token"])) {
if ($login) {
$token = bin2hex(random_bytes(32));
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/admin/private/tokens/" . $token, json_encode($result));
- setcookie("ADMIN_TOKEN", $token, 0, "/", ".minteck.ro.lt", true, true);
+ setcookie("ADMIN_TOKEN", $token, 0, "/", ".minteck.org", true, true);
header("Location: /admin");
} else {