diff options
Diffstat (limited to 'oauth')
-rw-r--r-- | oauth/.DS_Store | bin | 6148 -> 6148 bytes | |||
-rw-r--r-- | oauth/callback/index.php | 2 | ||||
-rw-r--r-- | oauth/init/index.php | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/oauth/.DS_Store b/oauth/.DS_Store Binary files differindex 2a12673..e14fa9f 100644 --- a/oauth/.DS_Store +++ b/oauth/.DS_Store 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(); |