protected function createOrUpdateAccount($token, $tokenSecret) {
		$uri = new Uri('https://api.twitter.com/1.1/account/verify_credentials.json');
		$request = Request::create($uri, 'GET');
		$request = $this->requestSignatureGenerator->signRequest($request);
		$request->setHeader('Content-Type', 'application/x-www-form-urlencoded', TRUE);

		$response = $this->requestEngine->sendRequest($request);
		$userData = json_decode($response->getContent(), TRUE);

		/** @var $account Account */
		$account = NULL;
		$providerName = $this->name;
		$accountRepository = $this->accountRepository;
		$this->securityContext->withoutAuthorizationChecks(function () use ($userData, $providerName, $accountRepository, &$account) {
			$account = $accountRepository->findByAccountIdentifierAndAuthenticationProviderName($userData['screen_name'], $providerName);
		});
		if ($account === NULL) {
			$defaultRole = $this->policyService->getRole('Flowpack.TwitterApi:AuthenticatedUser');
			$account = new Account();
			$account->setAccountIdentifier($userData['screen_name']);
			$account->setAuthenticationProviderName($providerName);
			$account->addRole($defaultRole);
			$this->accountRepository->add($account);
		}

		$account->setCredentialsSource($token . '&' . $tokenSecret);
		$this->accountRepository->update($account);
		$this->persistenceManager->whitelistObject($account);
		return $account;
	}