diff options
author | Minteck <contact@minteck.org> | 2021-12-04 15:42:09 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2021-12-04 15:42:09 +0100 |
commit | efadd6eda15122944d95e1b3f01c3f4c35d1f40a (patch) | |
tree | 7adce217645cdd220118c58cebc3dc129922edb2 /admin/callback/index.php | |
parent | 79d295f26659dd3b6aea93bb64803bf0778a8f84 (diff) | |
download | main-efadd6eda15122944d95e1b3f01c3f4c35d1f40a.tar.gz main-efadd6eda15122944d95e1b3f01c3f4c35d1f40a.tar.bz2 main-efadd6eda15122944d95e1b3f01c3f4c35d1f40a.zip |
Commit
Diffstat (limited to 'admin/callback/index.php')
-rw-r--r-- | admin/callback/index.php | 8 |
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 {
|