Refreshes all active tokens by updating the credentials.
This is useful when doing an explicit authentication inside a request.

@return void
979288
public function refreshTokens()
    {
        if ($this->initialized === false) {
            $this->initialize();
        }

        $this->updateTokens($this->activeTokens);
    }
681205
protected function refreshToken()
    {
        $token = $this->authorization->getApi()
                                     ->getAuthorizerToken(
                                         $this->authorization->getAuthorizerCorpId(),
                                         $this->authorization->getAuthorizerPermanentCode()
                                     );

        $this->authorization->setAuthorizerAccessToken($token['access_token'], $token['expires_in'] - 1500);

        return $token['access_token'];
    }
750294
public function refreshToken()
    {
        if (is_null($this->token) || is_null($this->token->getRefreshToken())) {
            return null;
        }

        $grant = new RefreshToken();
        $refreshToken = $this->provider->getAccessToken($grant, [
            'refresh_token' => $this->token->getRefreshToken()
        ]);

        $this->token = $refreshToken;


        return $this->token;
    }
53617
public function refresh()
    {
        $query = [
            'appid' => $this->appid,
            'grant_type' => 'refresh_token',
            'refresh_token' => $this['refresh_token'],
        ];

        $response = Http::request('GET', static::REFRESH)
            ->withQuery($query)
            ->send();

        if (0 != $response['errcode']) {
            throw new \Exception($response['errmsg'], $response['errcode']);
        }

        // update new access_token from ArrayCollection
        parent::__construct($response->toArray());

        return $this;
    }
1254080
public function refresh()
    {
        if ($this->_id !== null) {
            $data = $this->_collection->findOne(['_id' => $this->_id]);
            foreach ($this->_schema as $name => $desc) {
                if (isset($data[$name])) {
                    $this->$name = $data[$name];
                }
            }
        }
    }
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);
	}
612011
public function refresh() {
    $grant = new ClientCredentialsGrantRequest($this->clientId, $this->clientSecret, $this->scopes);
    $tokens = $grant->getTokens();

    $this->accessToken = $tokens->{"access_token"};
    $this->expiresAt = Util::calculateExpiryTime($tokens->{"expires_in"});
  }
1031648
public function clearOAuthToken()
    {
        $this->access_token = null;
        $this->access_token_expiration = null;
        $this->refresh_token = null;
    }
1281107
public function refresh() {
        global $CFG, $USER;
        if ($dir = opendir($this->dir)) {
            while (false !== ($file = readdir($dir))) {
                if (!is_dir($file) && $file != '.' && $file != '..') {
                    if (strpos($file, 'u'.$USER->id.'_') !== false) {
                        @unlink($this->dir.$file);
                    }
                }
            }
        }
    }
544600
private function refresh(): void
    {
        $time = \time();

        if (isset($this->data['time']) && $this->data['time'] <= ($time - $this->expire)) {

            //delete session data
            $this->data = [];

            //regenerate session
            $this->regenerate();
        }

        $this->setSessionData($time);
    }
984289
public function invalidateCurrentRefreshToken()
    {
        if ($this->grant === 'client_credentials') {
            return;
        }

        $token = $this->getAccessToken();
        if ($token) {
            $this->invalidateRefreshToken($token);
        }
    }
610008
public function refresh()
    {
        $token = Auth::guard()->refresh();

        return response()->json([
            'status' => 'ok',
            'token' => $token,
            'expires_in' => Auth::guard()->factory()->getTTL() * 60
        ]);
    }
1145901
@Override
    public synchronized void refreshCredentials() {
        GetSessionTokenResult sessionTokenResult = securityTokenService
                .getSessionToken(new GetSessionTokenRequest().withDurationSeconds(sessionDurationSeconds));
        sessionCredentials = sessionTokenResult.getCredentials();
    }
204161
protected function refreshAccessToken(){
        $config = $this->config;
        if (empty($config['app_id']) || empty($config['app_secret'])){
            if ($this->business_interface) $this->business_interface->log('APP_ID or APP_SECRET must be set');
            return null;
        }

        $url = self::API_ACCESS_TOKEN."grant_type=client_credential&appid={$config['app_id']}&secret={$config['app_secret']}";
        $result = $this->curl_access_token($url);
        if (!empty($result)) {
            $result = json_decode($result,true);
            if (empty($result['access_token'])) {
                if ($this->business_interface) $this->business_interface->log("Weixin Exception:errcode:{$result['errcode']},errmsg:{$result['errmsg']}");
                return null;
            }
            if ($this->business_interface) $this->business_interface->cache_access_token($result);
            return $result['access_token'];
        }
        return null;
    }
258419
protected function refreshApplication()
    {
        if (!$this->foundation->installed()) {
            return;
        }

        $this->call('extension:detect', ['--quiet' => true]);

        $extensions = $this->memory->get('extensions.active', []);

        try {
            foreach ($extensions as $extension => $config) {
                $options = ['name' => $extension, '--force' => true];

                $this->call('extension:refresh', $options);
                $this->call('extension:update', $options);
            }

            $this->foundation->make('antares.extension.provider')->writeFreshManifest();
        } catch (PDOException $e) {
            // Skip if application is unable to make connection to the database.
        }
    }
503047
private function refreshAccessToken() {
        // Setup the params
        $params = [
            'client_id'     => $this->clientID,
            'client_secret' => $this->secret,
            'grant_type'    => 'refresh_token',
            'refresh_token' => $this->refreshToken
        ];

        // Parse the cURL result
        $this->parseAccessToken(CURL::post($this->url, $params));
    }
1243265
public function Refresh() {
      $LocalName = $this->Current();
      
      $ApplicationWhiteList = Gdn::ApplicationManager()->EnabledApplicationFolders();
      $PluginWhiteList = Gdn::PluginManager()->EnabledPluginFolders();

      $ForceRemapping = TRUE;

      $this->Set($LocalName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping);
   }