From 747d8f88d5a635ba68b3f6288fb8d1f3fe48f83d Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Wed, 29 Nov 2023 22:27:20 +0100 Subject: Updated 19 files, added 5 files and deleted app/studio.php (automated) --- oauth/.DS_Store | Bin 6148 -> 6148 bytes oauth/callback/index.php | 2 +- oauth/init/index.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'oauth') diff --git a/oauth/.DS_Store b/oauth/.DS_Store index 2a12673..e14fa9f 100644 Binary files a/oauth/.DS_Store and b/oauth/.DS_Store differ diff --git a/oauth/callback/index.php b/oauth/callback/index.php index bbb3322..bb3f57f 100644 --- a/oauth/callback/index.php +++ b/oauth/callback/index.php @@ -19,7 +19,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(($_SERVER['SERVER_PORT'] === "8043" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback") . "&code=" . $_GET['code']); +curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode(($_SERVER['HTTP_HOST'] === "mist-testing.equestria.horse" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback") . "&code=" . $_GET['code']); $result = curl_exec($crl); $result = json_decode($result, true); diff --git a/oauth/init/index.php b/oauth/init/index.php index f0696b2..4f2be05 100644 --- a/oauth/init/index.php +++ b/oauth/init/index.php @@ -4,5 +4,5 @@ header("X-Frame-Options: DENY"); $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); $server = "account.equestria.dev"; -header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $app["id"] . "&response_type=code&redirect_uri=" . ($_SERVER['SERVER_PORT'] === "8043" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback&scope=Hub&request_credentials=default&access_type=offline"); +header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $app["id"] . "&response_type=code&redirect_uri=" . ($_SERVER['HTTP_HOST'] === "mist-testing.equestria.horse" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback&scope=Hub&request_credentials=default&access_type=offline"); die(); -- cgit