Revoke the refresh token currently active.
489299
def revoke_refresh_token(self):
        

        if not self._refresh_token:
            return

        self.execute_post('authentication/revoke', json=dict(
            token_type_hint='refresh_token',
            token=self._refresh_token
        ))

        self._refresh_token = None
1021457
def revoke_token(self, token, headers=None, **kwargs):
        
        self._check_configuration("site", "revoke_uri")
        url = "%s%s" % (self.site, quote(self.revoke_url))
        data = {'token': token}
        data.update(kwargs)

        return self._make_request(url, data=data, headers=headers)
821433
def stop_refresh(self):
        
        self.logger.debug("stopping timed refresh")
        self.rf_flags['done'] = True
        self.rf_timer.clear()
363339
protected function unsetRefreshToken($refreshToken)
    {
        if (null !== $token = $this->app['repo.api-oauth-refresh-token']->find($refreshToken)) {
            $this->app['manipulator.api-oauth-refresh-token']->delete($token);
        }

        return $this;
    }
255361
final protected function refreshToken()
    {
        $oldAccessToken = $this->accessToken;

        if ($this->accessToken->getRefreshToken()) {
            $this->accessToken = $this->provider->getAccessToken(self::GRANT_REFRESH_TOKEN, [
                'refresh_token' => $this->accessToken->getRefreshToken(),
            ]);
        } else {
            // request a completely new access token
            $this->accessToken = $this->requestAccessToken();
        }

        if ($this->refreshTokenCallback) {
            call_user_func($this->refreshTokenCallback, $this->accessToken, $oldAccessToken);
        }
    }
76427
public function revoke()
    {
        $accessToken = $this->tokenRepo->get();
        $url = $this->credentials['loginURL'].'/services/oauth2/revoke';

        $options['headers']['content-type'] = 'application/x-www-form-urlencoded';
        $options['form_params']['token'] = $accessToken;

        return $this->httpClient->request('post', $url, $options);
    }
363051
def logout(self, refresh_token):
        
        return self._realm.client.post(self.get_url('end_session_endpoint'),
                                       data={
                                           'refresh_token': refresh_token,
                                           'client_id': self._client_id,
                                           'client_secret': self._client_secret
                                       })
1320262
def revoke_token(access_token):
    
    response = requests.post(
        get_revoke_token_url(),
        data={
            'token': access_token,
            'client_id': settings.API_CLIENT_ID,
            'client_secret': settings.API_CLIENT_SECRET,
        },
        timeout=15
    )
    return response.status_code == 200
1343826
def refresh(self, refresh_token):
        
        r = requests.post(self.apiurl + "/token", params={"grant_type": "refresh_token", "client_id": self.cid,
                                                          "client_secret": self.csecret,
                                                          "refresh_token": refresh_token})

        if r.status_code != 200:
            raise ServerError

        jsd = r.json()

        return jsd['access_token'], int(jsd['expires_in']) + int(jsd['created_at'])
813428
@Scheduled(fixedRate = 60000) // run every minute
	public void invalidateOldTokens() {
		List<String> invalidTokens = new ArrayList<String>(); // tokens to invalidate
		for (Map.Entry<String, TokenContainer> entry : tokens.entrySet()) {
			if (!entry.getValue().isValid()) {
				invalidTokens.add(entry.getKey());
			}
		}
		for (String token : invalidTokens) {
			logout(token);
		}
	}
452666
def finish_user(self, subid):
    ''''''        

    p = self.revoke_token(subid)
    p.token = "finished"
    self.session.commit()
    return p
255168
public function reset()
    {

        $this->token_type = '';

        $this->access_token = '';
        $this->expires_in = 0;
        $this->expire_time = 0;

        $this->refresh_token = '';
        $this->refresh_token_expires_in = 0;
        $this->refresh_token_expire_time = 0;

        $this->scope = '';
        $this->owner_id = '';

        return $this;

    }
545531
private String getRefreshToken(Token accessToken) {
    JSONObject rawJson = JSONObject.fromObject(accessToken.getRawResponse());
    return rawJson.getString("refresh_token");
  }
185148
async def revoke(self, schemaId: ID, i):
        
        acc, ts = await self._nonRevocationIssuer.revoke(schemaId, i)
        await self.wallet.submitAccumUpdate(schemaId=schemaId, accum=acc,
                                            timestampMs=ts)
248435
def revoke_user_access( self, access_id ):
        '''
            
        ''' 
        path = "/api/v3/publisher/user/access/revoke"

        data = {
            'api_token': self.api_token, 
            'access_id': access_id,
        }

        r = requests.get( self.base_url + path, data=data )

        if r.status_code != 200:
            raise ValueError( path + ":" + r.reason )
829161
public function actionClear()
    {
        OAuth2AuthorizationCode::deleteAll(['<', 'expires', time()]);
        OAuth2RefreshToken::deleteAll(['<', 'expires', time()]);
        OAuth2AccessToken::deleteAll(['<', 'expires', time()]);
    }
194792
public function revokeRefreshToken($tokenId)
    {
        $this->getEntityManager()->transactional(function(EntityManagerInterface $em) use ($tokenId) {
            $token = $this->find($tokenId);

            if ($token) {
                $em->remove($token);
            }
        });
    }