Yoast\WP\SEO\Routes

Wincher_Route::authenticate()publicYoast 1.0

Authenticates with Wincher.

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

Хуков нет.

Возвращает

WP_REST_Response. The response.

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

$Wincher_Route = new Wincher_Route();
$Wincher_Route->authenticate( $request );
$request(WP_REST_Request) (обязательный)
The request. This request should have a code param set.

Код Wincher_Route::authenticate() Yoast 20.0

public function authenticate( WP_REST_Request $request ) {
	$data = $this
		->login_action
		->authenticate( $request['code'], (string) $request['websiteId'] );

	return new WP_REST_Response( $data, $data->status );
}