public function handleTokenRequest(\OAuth2\RequestInterface $request = null, \OAuth2\ResponseInterface $response = null) { if ($request === null) { $request = $this->module->getRequest(); } return parent::handleTokenRequest($request, $response); }
protected function getErrorMessage(\OAuth2\Response $response) { $message = Module::t('common', $response->getParameter('error_description')); if ($message === null) { $message = Module::t('common', 'An internal server error occurred.'); } return $message; }