|
@@ 852-870 (lines=19) @@
|
| 849 |
|
* @param Boolean $is_signed Whether the signature check has been successful. |
| 850 |
|
* @param Jetpack_XMLRPC_Server $xmlrpc_server (optional) An instance of the server to use instead of instantiating a new one. |
| 851 |
|
*/ |
| 852 |
|
public function setup_xmlrpc_handlers( |
| 853 |
|
$request_params, |
| 854 |
|
$is_active, |
| 855 |
|
$is_signed, |
| 856 |
|
Jetpack_XMLRPC_Server $xmlrpc_server = null |
| 857 |
|
) { |
| 858 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' ); |
| 859 |
|
|
| 860 |
|
if ( ! $this->connection_manager ) { |
| 861 |
|
$this->connection_manager = new Connection_Manager(); |
| 862 |
|
} |
| 863 |
|
|
| 864 |
|
return $this->connection_manager->setup_xmlrpc_handlers( |
| 865 |
|
$request_params, |
| 866 |
|
$is_active, |
| 867 |
|
$is_signed, |
| 868 |
|
$xmlrpc_server |
| 869 |
|
); |
| 870 |
|
} |
| 871 |
|
|
| 872 |
|
/** |
| 873 |
|
* Initialize REST API registration connector. |
|
@@ 5517-5525 (lines=9) @@
|
| 5514 |
|
* @param string $password Password string. |
| 5515 |
|
* @return \WP_User|mixed Authenticated user or error. |
| 5516 |
|
*/ |
| 5517 |
|
public function authenticate_jetpack( $user, $username, $password ) { |
| 5518 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' ); |
| 5519 |
|
|
| 5520 |
|
if ( ! $this->connection_manager ) { |
| 5521 |
|
$this->connection_manager = new Connection_Manager(); |
| 5522 |
|
} |
| 5523 |
|
|
| 5524 |
|
return $this->connection_manager->authenticate_jetpack( $user, $username, $password ); |
| 5525 |
|
} |
| 5526 |
|
|
| 5527 |
|
// Authenticates requests from Jetpack server to WP REST API endpoints. |
| 5528 |
|
// Uses the existing XMLRPC request signing implementation. |