Automattic\WooCommerce\Internal\Abilities

AbilitiesTracking::is_jetpack_signed_request │ private static │ WC 1.0

Whether Jetpack authenticated this request with a blog or user token signature.

Jetpack is only asked when the request carries its signature arguments, so its REST authentication isn't initialized here on other requests.

Метод класса: AbilitiesTracking{}

Хуков нет.

Возвращает

bool.

Использование

$result = AbilitiesTracking::is_jetpack_signed_request(): bool;

Код AbilitiesTracking::is_jetpack_signed_request() WC 11.3.0

private static function is_jetpack_signed_request(): bool {
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only checks for the presence of Jetpack's signature arguments.
	if ( ! isset( $_GET['token'], $_GET['signature'] ) ) {
		return false;
	}
	$rest_authentication = 'Automattic\Jetpack\Connection\Rest_Authentication';
	return is_callable( array( $rest_authentication, 'is_signed_with_blog_token' ) )
		&& is_callable( array( $rest_authentication, 'is_signed_with_user_token' ) )
		&& ( $rest_authentication::is_signed_with_blog_token() || $rest_authentication::is_signed_with_user_token() );
}