Revokes access token

        :param token: access token
970497
def revoke_token(self, token, token_type=''):
        
        if token_type:
            self.handler[token_type].black_list(token)
        else:
            self.handler.black_list(token)
1275130
def revoke_token
      # entry point
      url = "#{@client.app_info[:launcher_server]}#{API_VERSION}/auth"

      # api call
      uri = URI(url)
      http = Net::HTTP.new(uri.host, uri.port)
      req = Net::HTTP::Delete.new(uri.path, {
        'Authorization' => "Bearer #{@client.key_helper.get_valid_token()}"
      })
      res = http.request(req)
      res.code == "200"
    end
519109
public function revokeToken($token)
    {
        $this->oauth->token = $token;
        $this->oauth->calltokenHandler();

        if ( ! $this->hasErrors()) {
            return $this->model->deleteToken(['key' => $token]);
        }

        return false;
    }
1298593
def reset
			self.access_token           = DEFAULT_ACCESS_TOKEN
			self.authorization_endpoint = DEFAULT_AUTHORIZATION_ENDPOINT
			self.client_id              = DEFAULT_CLIENT_ID
			self.client_secret          = DEFAULT_CLIENT_SECRET
			self.endpoint               = DEFAULT_ENDPOINT
			self.proxy                  = DEFAULT_PROXY
			self.user_agent             = DEFAULT_USER_AGENT
		end
1031648
public function clearOAuthToken()
    {
        $this->access_token = null;
        $this->access_token_expiration = null;
        $this->refresh_token = null;
    }
57849
public function revoke()
    {
        $accessToken = $this->tokenRepo->get()['access_token'];
        $url = $this->getLoginURL();
        $url .= '/services/oauth2/revoke';

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

        return $this->httpClient->post($url, $options);
    }
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
570098
def revoke_token
      r = HTTP.auth('Bearer ' + @access_token).post(API + '/auth/token/revoke')
      raise ApiError.new(r) if r.code != 200
    end
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();
    }
416725
def token_auth(self, token):
        
        if not token:
            return

        self.headers.update({
            'Authorization': 'token {0}'.format(token)
            })
        # Unset username/password so we stop sending them
        self.auth = None
70239
public function revokeAccessToken()
    {
        //Access Token
        $accessToken = $this->getApp()->getAccessToken();

        //Request
        $request = new DropboxRequest("POST", "/auth/token/revoke", $accessToken);
        // Do not validate the response
        // since the /token/revoke endpoint
        // doesn't return anything in the response.
        // See: https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke
        $request->setParams(['validateResponse' => false]);

        //Revoke Access Token
        $this->getClient()->sendRequest($request);
    }
598264
def revoke_tokens(self):
        

        self.is_active = False
        self.save()

        self.refresh_token.revoke_tokens()
568120
def invalidate_token(self, body, params=None):
        
        if body in SKIP_IN_PATH:
            raise ValueError("Empty value passed for a required argument 'body'.")
        return self.transport.perform_request(
            "DELETE", "/_security/oauth2/token", params=params, body=body
        )
1078964
def rm_token(opts, tok):
    '''
    
    '''
    redis_client = _redis_client(opts)
    if not redis_client:
        return
    try:
        redis_client.delete(tok)
        return {}
    except Exception as err:
        log.warning('Could not remove token %s: %s', tok, err)
707605
def logout(request):
    '''
    
    '''
    user = request.user
    serializer = LogoutSerializer(data=request.data)
    serializer.is_valid(raise_exception=True)
    data = serializer.validated_data

    if should_authenticate_session():
        auth.logout(request)
    if should_retrieve_token() and data['revoke_token']:
        try:
            user.auth_token.delete()
        except Token.DoesNotExist:
            raise BadRequest('Cannot remove non-existent token')

    return get_ok_response('Logout successful')
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
1018716
def revoke(self, role):
        
        if role in self.roles:
            self.roles.remove(role)