diff options
Diffstat (limited to 'oauth')
-rw-r--r-- | oauth/.DS_Store | bin | 6148 -> 6148 bytes | |||
-rw-r--r-- | oauth/callback-native/index.php | 3 | ||||
-rw-r--r-- | oauth/callback/index.php | 3 | ||||
-rw-r--r-- | oauth/index.php | 2 | ||||
-rw-r--r-- | oauth/init/index.php | 3 | ||||
-rw-r--r-- | oauth/native/index.php | 3 | ||||
-rw-r--r-- | oauth/needs-native/index.php | 1 |
7 files changed, 10 insertions, 5 deletions
diff --git a/oauth/.DS_Store b/oauth/.DS_Store Binary files differindex f3ee465..b1ba7bb 100644 --- a/oauth/.DS_Store +++ b/oauth/.DS_Store diff --git a/oauth/callback-native/index.php b/oauth/callback-native/index.php index ea9993b..c5d0b44 100644 --- a/oauth/callback-native/index.php +++ b/oauth/callback-native/index.php @@ -1,5 +1,6 @@ <?php +header("X-Frame-Options: DENY"); $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); $server = "account.equestria.dev"; @@ -18,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" ? "http://localhost:8043" : "https://wavy.equestria.horse") . "/oauth/callback-native") . "&code=" . $_GET['code']); +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-native") . "&code=" . $_GET['code']); $result = curl_exec($crl); $result = json_decode($result, true); diff --git a/oauth/callback/index.php b/oauth/callback/index.php index e879990..d65bced 100644 --- a/oauth/callback/index.php +++ b/oauth/callback/index.php @@ -1,5 +1,6 @@ <?php +header("X-Frame-Options: DENY"); $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); $server = "account.equestria.dev"; @@ -18,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" ? "http://localhost:8043" : "https://wavy.equestria.horse") . "/oauth/callback") . "&code=" . $_GET['code']); +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']); $result = curl_exec($crl); $result = json_decode($result, true); diff --git a/oauth/index.php b/oauth/index.php index e381cbd..96cc545 100644 --- a/oauth/index.php +++ b/oauth/index.php @@ -1 +1 @@ -<?php header("Location: /oauth/init/") and die();
\ No newline at end of file +<?php header("X-Frame-Options: DENY"); header("Location: /oauth/init/") and die();
\ No newline at end of file diff --git a/oauth/init/index.php b/oauth/init/index.php index 9a3ab52..f0696b2 100644 --- a/oauth/init/index.php +++ b/oauth/init/index.php @@ -1,7 +1,8 @@ <?php +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" ? "http://localhost:8043" : "https://wavy.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['SERVER_PORT'] === "8043" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback&scope=Hub&request_credentials=default&access_type=offline"); die(); diff --git a/oauth/native/index.php b/oauth/native/index.php index bec74e2..9401489 100644 --- a/oauth/native/index.php +++ b/oauth/native/index.php @@ -1,7 +1,8 @@ <?php +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" ? "http://localhost:8043" : "https://wavy.equestria.horse") . "/oauth/callback-native&scope=Hub&request_credentials=required&access_type=offline"); +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-native&scope=Hub&request_credentials=required&access_type=offline"); die(); diff --git a/oauth/needs-native/index.php b/oauth/needs-native/index.php index 0de2bce..fe1345e 100644 --- a/oauth/needs-native/index.php +++ b/oauth/needs-native/index.php @@ -1,3 +1,4 @@ +<?php header("X-Frame-Options: DENY"); ?> <!doctype html> <html lang="en"> <head> |