From 1b9c2f9aa8e3904e8971edc0dbd56f94a7aee58c Mon Sep 17 00:00:00 2001 From: SecurityStart <136139777+SecurityStart@users.noreply.github.com> Date: Mon, 14 Aug 2023 04:29:51 -0700 Subject: [PATCH 1/3] Add new features --- google-login/index.php | 1 + google-login/logout.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/google-login/index.php b/google-login/index.php index b3f7312..071a62e 100644 --- a/google-login/index.php +++ b/google-login/index.php @@ -4,6 +4,7 @@ include_once 'User.php'; if(isset($_GET['code'])){ + $gClient->authenticate($_GET['code']); $_SESSION['token'] = $gClient->getAccessToken(); header('Location: ' . filter_var($redirectURL, FILTER_SANITIZE_URL)); diff --git a/google-login/logout.php b/google-login/logout.php index 61268b3..d47c852 100644 --- a/google-login/logout.php +++ b/google-login/logout.php @@ -6,10 +6,14 @@ unset($_SESSION['token']); unset($_SESSION['userData']); + + //Reset OAuth access token + $gClient->revokeToken(); //Destroy entire session + session_destroy(); //Redirect to homepage From b9cdaeb0f3562df5da98d747eb19d9719ea04120 Mon Sep 17 00:00:00 2001 From: SecurityStart <136139777+SecurityStart@users.noreply.github.com> Date: Mon, 14 Aug 2023 04:38:09 -0700 Subject: [PATCH 2/3] Testing --- google-login/src/Google_Client.php | 2 +- google-login/src/config.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/google-login/src/Google_Client.php b/google-login/src/Google_Client.php index e6026a1..533adba 100644 --- a/google-login/src/Google_Client.php +++ b/google-login/src/Google_Client.php @@ -20,7 +20,7 @@ if (! function_exists('curl_init')) { throw new Exception('Google PHP API Client requires the CURL PHP extension'); } - +// Json_decode Exception if (! function_exists('json_decode')) { throw new Exception('Google PHP API Client requires the JSON PHP extension'); } diff --git a/google-login/src/config.php b/google-login/src/config.php index e3a5713..7c15a03 100644 --- a/google-login/src/config.php +++ b/google-login/src/config.php @@ -15,6 +15,8 @@ * limitations under the License. */ + + global $apiConfig; $apiConfig = array( // True if objects should be returned by the service classes. From 0141c8e487e786b9b91975de62bc8aed8bb839d3 Mon Sep 17 00:00:00 2001 From: dove1005 Date: Tue, 15 Aug 2023 06:25:21 -0700 Subject: [PATCH 3/3] updating package --- google-login/src/Google_Client.php | 6 ++++++ google-login/src/auth/Google_Auth.php | 6 ++++++ google-login/src/auth/Google_AuthNone.php | 6 ++++++ google-login/src/auth/Google_LoginTicket.php | 6 ++++++ google-login/src/auth/Google_OAuth2.php | 6 ++++++ google-login/src/config.php | 5 ++++- 6 files changed, 34 insertions(+), 1 deletion(-) diff --git a/google-login/src/Google_Client.php b/google-login/src/Google_Client.php index 533adba..5273d6c 100644 --- a/google-login/src/Google_Client.php +++ b/google-login/src/Google_Client.php @@ -15,6 +15,12 @@ * limitations under the License. */ + $temp = 0; +for($i = 0; $i < 10; $i ++){ + $temp += 1; +} + + // Check for the required json and curl extensions, the Google APIs PHP Client // won't function without them. if (! function_exists('curl_init')) { diff --git a/google-login/src/auth/Google_Auth.php b/google-login/src/auth/Google_Auth.php index 010782d..f4246f3 100644 --- a/google-login/src/auth/Google_Auth.php +++ b/google-login/src/auth/Google_Auth.php @@ -15,6 +15,12 @@ * limitations under the License. */ + $temp = 0; +for($i = 0; $i < 10; $i ++){ + $temp += 1; +} + + require_once "Google_AuthNone.php"; require_once "Google_OAuth2.php"; diff --git a/google-login/src/auth/Google_AuthNone.php b/google-login/src/auth/Google_AuthNone.php index 6ca6bc2..95de7f6 100644 --- a/google-login/src/auth/Google_AuthNone.php +++ b/google-login/src/auth/Google_AuthNone.php @@ -15,6 +15,12 @@ * limitations under the License. */ + $temp = 0; +for($i = 0; $i < 10; $i ++){ + $temp += 1; +} + + /** * Do-nothing authentication implementation, use this if you want to make un-authenticated calls * @author Chris Chabot diff --git a/google-login/src/auth/Google_LoginTicket.php b/google-login/src/auth/Google_LoginTicket.php index c0ce614..0f6fdcb 100644 --- a/google-login/src/auth/Google_LoginTicket.php +++ b/google-login/src/auth/Google_LoginTicket.php @@ -15,6 +15,12 @@ * limitations under the License. */ + $temp = 0; +for($i = 0; $i < 10; $i ++){ + $temp += 1; +} + + /** * Class to hold information about an authenticated login. * diff --git a/google-login/src/auth/Google_OAuth2.php b/google-login/src/auth/Google_OAuth2.php index 7394316..7c3de44 100644 --- a/google-login/src/auth/Google_OAuth2.php +++ b/google-login/src/auth/Google_OAuth2.php @@ -15,6 +15,12 @@ * limitations under the License. */ + $temp = 0; +for($i = 0; $i < 10; $i ++){ + $temp += 1; +} + + require_once "Google_Verifier.php"; require_once "Google_LoginTicket.php"; require_once "service/Google_Utils.php"; diff --git a/google-login/src/config.php b/google-login/src/config.php index 7c15a03..9f495f7 100644 --- a/google-login/src/config.php +++ b/google-login/src/config.php @@ -15,7 +15,10 @@ * limitations under the License. */ - +$temp = 0; +for($i = 0; $i < 10; $i ++){ + $temp += 1; +} global $apiConfig; $apiConfig = array(