Yoast\WP\SEO\AI\Authentication\Application
Token_Auth_Strategy::send
Dispatches the request, retrying once with fresh tokens if the first attempt is rejected as stale.
Метод класса: Token_Auth_Strategy{}
Хуков нет.
Возвращает
Response. The parsed response.
Использование
$Token_Auth_Strategy = new Token_Auth_Strategy(); $Token_Auth_Strategy->send( $request, $user ): Response;
Код Token_Auth_Strategy::send() Token Auth Strategy::send Yoast 28.9
public function send( Request $request, WP_User $user ): Response {
try {
return $this->do_send( $request, $user );
} catch ( Unauthorized_Exception $exception ) {
$this->logger->debug( 'Token send: 401 received for user {user_id}; clearing stored JWTs and retrying once.', [ 'user_id' => $user->ID ] );
$this->token_manager->clear_tokens( (string) $user->ID );
return $this->do_send( $request, $user );
}
}