diff options
Diffstat (limited to 'oauth')
-rw-r--r-- | oauth/.DS_Store | bin | 6148 -> 6148 bytes | |||
-rw-r--r-- | oauth/callback-native/index.php | 4 | ||||
-rw-r--r-- | oauth/callback/index.php | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/oauth/.DS_Store b/oauth/.DS_Store Binary files differindex 1333ff9..d23a8fa 100644 --- a/oauth/.DS_Store +++ b/oauth/.DS_Store diff --git a/oauth/callback-native/index.php b/oauth/callback-native/index.php index c289957..5095734 100644 --- a/oauth/callback-native/index.php +++ b/oauth/callback-native/index.php @@ -38,7 +38,9 @@ if (isset($result["access_token"])) { $result = $result_orig = curl_exec($crl); $result = json_decode($result, true); - if (!in_array($result["id"], $app["allowed"])) { + $isAllowed = in_array("5fe2cdf1-cff8-470e-a54a-ad1c713b0387", array_map(function ($i) { return $i["id"]; }, $result["transitiveGroups"])); + + if (!$isAllowed) { header("HTTP/1.1 403 Forbidden"); die("Not allowed to log in to this application. This will be reported."); } diff --git a/oauth/callback/index.php b/oauth/callback/index.php index bbb3322..f57e124 100644 --- a/oauth/callback/index.php +++ b/oauth/callback/index.php @@ -38,7 +38,9 @@ if (isset($result["access_token"])) { $result = $result_orig = curl_exec($crl); $result = json_decode($result, true); - if (!in_array($result["id"], $app["allowed"])) { + $isAllowed = in_array("5fe2cdf1-cff8-470e-a54a-ad1c713b0387", array_map(function ($i) { return $i["id"]; }, $result["transitiveGroups"])); + + if (!$isAllowed) { header("HTTP/1.1 403 Forbidden"); die("Not allowed to log in to this application. This will be reported."); } |