protected function fetchAccessToken(OAuth2Client $client) { try { return $client->getAccessToken(); } catch (MissingAuthorizationCodeException $e) { throw new NoAuthCodeAuthenticationException(); } }