@param null|string $refreshToken

@return void
5074
private function setRefreshToken($refreshToken)
    {
        if (null !== $refreshToken) {
            // refresh-token = 1*VSCHAR
            // VSCHAR        = %x20-7E
            if (1 !== \preg_match('/^[\x20-\x7E]+$/', $refreshToken)) {
                throw new AccessTokenException('invalid "refresh_token"');
            }
        }
        $this->refreshToken = $refreshToken;
    }
168892
public function buildUrlParams($refreshToken)
    {
        $params = 'client_id=' . $this->helper->getWebsiteConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CLIENT_ID
        )
            . '&client_secret=' . $this->helper->getWebsiteConfig(
                \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CLIENT_SECRET_ID
            )
            . '&refresh_token=' . $refreshToken . '&grant_type=refresh_token';

        return $params;
    }
1339532
public function invalidateRefreshToken(AccessToken $token)
    {
        $this->getAuthorizationServer()->getAuthenticatedRequest('DELETE',
            $this->authorizationServerUri . '/v2/auth/token', $token, [
                'json' => [
                    'token' => $token->getRefreshToken(),
                ],
            ]);

        $user = $this->getFrameworkBridge()->getUser($token->getResourceOwnerId());
        $user->clearOAuthToken();
    }
961818
public synchronized void refreshToken()
	{
		final String refreshToken = this.response.refresh_token;

		this.response = null;
		this.cachedInfo = null;

		final String responseStr = authService.getToken(UserManagerOAuthService.GRANT_TYPE_REFRESH_TOKEN,
		                                                null,
		                                                null,
		                                                clientId,
		                                                clientSecret,
		                                                refreshToken,
		                                                null,
		                                                null,
		                                                null);

		loadAuthResponse(responseStr);
	}
771874
protected function setRefreshToken($refreshToken, $accountId, $expires, $scope = null)
    {
        if (null === $account = $this->app['repo.api-accounts']->find($accountId)) {
            throw new RuntimeException(sprintf('Account with id %s is not valid', $accountId));
        }
        $token = $this->app['manipulator.api-oauth-refresh-token']->create($account, $expires, $scope);
        $this->app['manipulator.api-oauth-refresh-token']->setRefreshToken($token, $refreshToken);

        return $this;
    }
604928
public function setAccessToken($accessToken, $accessTokenLimit = null)
    {
        $this->setAuthConfig('access_token', $accessToken);
        if ($accessTokenLimit) {
            $this->setAuthConfig('access_token_limit', $accessTokenLimit);
        }
    }
665279
public Credential setRefreshToken(String refreshToken) {
    lock.lock();
    try {
      if (refreshToken != null) {
        Preconditions.checkArgument(jsonFactory != null && transport != null
            && clientAuthentication != null && tokenServerEncodedUrl != null,
            "Please use the Builder and call setJsonFactory, setTransport, setClientAuthentication"
            + " and setTokenServerUrl/setTokenServerEncodedUrl");
      }
      this.refreshToken = refreshToken;
    } finally {
      lock.unlock();
    }
    return this;
  }
1239732
public function setRefreshToken($tenantKey, $refreshToken)
    {
        if ($this->tenantTokens[$tenantKey] == null) {
            $this->tenantTokens[$tenantKey] = array();
        }
        $this->tenantTokens[$tenantKey]['refreshToken'] = $refreshToken;
    }
543057
public function refreshOauth2AccessToken($refreshToken, $grantType = 'refresh_token')
    {
        $result = $this->httpGet(self::WECHAT_OAUTH2_ACCESS_TOKEN_REFRESH_URL . http_build_query([
            'appid' => $this->appId,
            'grant_type' => $grantType,
            'refresh_token' => $refreshToken
        ]));
        return isset($result['errmsg']) ? false : $result;
    }
58433
public DConnection findByRefreshToken(java.lang.String refreshToken) {
    return queryUniqueByField(null, DConnectionMapper.Field.REFRESHTOKEN.getFieldName(), refreshToken);
  }
1112041
public function findUserByValidRefreshToken($token)
    {
        /** @var BaseUser $user */
        $user = $this->findOneBy(['refreshToken' => $token]);

        if (!empty($user) && $user->isRefreshTokenValid()) {
            return $user;
        }

        return null;
    }
909473
public function setAccessToken(AccessToken $accessToken)
    {
        if (!$accessToken->isValid()) {
            $accessToken->refresh();
        }

        $this->accessToken = $accessToken;
    }
507383
public function setRefreshToken($refreshToken = null)
    {
        $this->refreshToken = null === $refreshToken
            ? bin2hex(openssl_random_pseudo_bytes(64))
            : $refreshToken;

        return $this;
    }
1349930
protected function expireRefreshToken($refreshToken, $user)
    {
        $token = $this->refreshTokenMapper->findBy([
            'refresh_token' => $refreshToken,
            'user_id'       => $user->getId(),
        ]);

        if (! $token) {
            throw new OutOfBoundsException('Refresh token not found.');
        }

        $token->setExpires(date("Y-m-d H:i:s", time()));

        $this->refreshTokenMapper->update($token);
    }
791009
public function refreshTokenWithAssertion($assertionCredentials = null) {
    if (!$assertionCredentials) {
      $assertionCredentials = $this->assertionCredentials;
    }

    $this->refreshTokenRequest(array(
        'grant_type' => 'assertion',
        'assertion_type' => $assertionCredentials->assertionType,
        'assertion' => $assertionCredentials->generateAssertion(),
    ));
  }
1256532
public function updateRefreshToken(): void
    {

        tap($this->token, function ($token) {

            // If no API call was made, the client would never have
            // been instantiated and auth information never updated.
            if (is_null($this->client) || $this->public_call)
                return;

            $last_auth = $this->client->getAuthentication();

            $token->token = $last_auth->access_token ?? '-';
            $token->expires_on = $last_auth->token_expires;

            $token->save();
        });
    }
635897
public function setRefreshTokenStorage(RefreshTokenInterface $storage)
    {
        $storage->setServer($this);
        $this->refreshTokenStorage = $storage;

        return $this;
    }