oauthService = $oauthService; $this->helper = $helper; } /** * @inheritDoc */ public function createCsrfValidationException( RequestInterface $request ): ?InvalidRequestException { return null; } /** * @inheritDoc */ public function validateForCsrf(RequestInterface $request): ?bool { return true; } /** * Initiate RequestToken request operation * * @return void */ public function execute() { try { $requestUrl = $this->helper->getRequestUrl($this->getRequest()); $request = $this->helper->prepareRequest($this->getRequest(), $requestUrl); // Request request token $response = $this->oauthService->getRequestToken($request, $requestUrl, $this->getRequest()->getMethod()); } catch (\Exception $exception) { $response = $this->helper->prepareErrorResponse($exception, $this->getResponse()); } $this->getResponse()->setBody(http_build_query($response)); } }