essful. $this->rest_authentication_status = true; $this->rest_authentication_type = 'blog'; return null; } if ( $verified && isset( $verified['type'] ) && 'user' === $verified['type'] && ! empty( $verified['user_id'] ) ) { // User-level authentication successful. $this->rest_authentication_status = true; $this->rest_authentication_type = 'user'; return $verified['user_id']; } // Something else went wrong. Probably a signature error. $this->rest_authentication_status = new \WP_Error( 'rest_invalid_signature', __( 'The request is not signed correctly.', 'jetpack-connection' ), array( 'status' => 400 ) ); return null; } finally { $this->doing_determine_current_user_filter = false; } } /** * Report authentication status to the WP REST API. * * @param WP_Error|mixed $value Error from another authentication handler, null if we should handle it, or another value if not. * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} */ public function wp_rest_authentication_errors( $value ) { if ( null !== $value ) { return $value; } return $this->rest_authentication_status; } /** * Resets the saved authentication state in between testing requests. */ public function reset_saved_auth_state() { $this->rest_authentication_status = null; $this->connection_manager->reset_saved_auth_state(); } /** * Whether the request was signed with a blog token. * * @since 1.29.0 * * @return bool True if the request was signed with a valid blog token, false otherwise. */ public static function is_signed_with_blog_token() { $instance = self::init(); return true === $instance->rest_authentication_status && 'blog' === $instance->rest_authentication_type; } }
Fatal error: Uncaught Error: Class "Automattic\Jetpack\Connection\Rest_Authentication" not found in /htdocs/wp-content/plugins/jetpack/class.jetpack.php:709 Stack trace: #0 /htdocs/wp-content/plugins/jetpack/class.jetpack.php(479): Jetpack->__construct() #1 /htdocs/wp-content/plugins/jetpack/load-jetpack.php(78): Jetpack::init() #2 /htdocs/wp-content/plugins/jetpack/jetpack.php(199): require_once('/htdocs/wp-cont...') #3 /htdocs/wp-settings.php(462): include_once('/htdocs/wp-cont...') #4 /htdocs/wp-config.php(96): require_once('/htdocs/wp-sett...') #5 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #6 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #7 /htdocs/index.php(17): require('/htdocs/wp-blog...') #8 {main} thrown in /htdocs/wp-content/plugins/jetpack/class.jetpack.php on line 709