diff --git a/includes/Core/Authentication/Clients/OAuth_Client.php b/includes/Core/Authentication/Clients/OAuth_Client.php index b600d844dce..636cd18f076 100644 --- a/includes/Core/Authentication/Clients/OAuth_Client.php +++ b/includes/Core/Authentication/Clients/OAuth_Client.php @@ -569,24 +569,6 @@ public function refresh_profile_data( $retry_after = 0 ) { } } - /** - * Determines whether the authentication proxy is used. - * - * In order to streamline the setup and authentication flow, the plugin uses a proxy mechanism based on an external - * service. This can be overridden by providing actual GCP credentials with the {@see 'googlesitekit_oauth_secret'} - * filter. - * - * @since 1.0.0 - * @deprecated 1.9.0 - * - * @return bool True if proxy authentication is used, false otherwise. - */ - public function using_proxy() { - _deprecated_function( __METHOD__, '1.9.0', Credentials::class . '::using_proxy' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - - return $this->credentials->using_proxy(); - } - /** * Determines whether the current owner ID must be changed or not. * diff --git a/tests/phpunit/integration/Core/Authentication/Clients/OAuth_ClientTest.php b/tests/phpunit/integration/Core/Authentication/Clients/OAuth_ClientTest.php index f265b53c30a..29778b7be9f 100644 --- a/tests/phpunit/integration/Core/Authentication/Clients/OAuth_ClientTest.php +++ b/tests/phpunit/integration/Core/Authentication/Clients/OAuth_ClientTest.php @@ -709,23 +709,6 @@ function ( Request $request ) { $this->assertTrue( $google_client_mock->shouldDefer() ); } - public function test_using_proxy() { - $this->setExpectedDeprecated( OAuth_Client::class . '::using_proxy' ); - $context = new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ); - $client = new OAuth_Client( $context ); - - // Use proxy by default. - $this->assertTrue( $client->using_proxy() ); - - // Don't use proxy when regular OAuth client ID is used. - $this->fake_site_connection(); - $this->assertFalse( $client->using_proxy() ); - - // Use proxy when proxy site ID is used. - $this->fake_proxy_site_connection(); - $this->assertTrue( $client->using_proxy() ); - } - public function test_get_proxy_permissions_url() { $context = new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE );