Tell the Dropbox API server to disable an OAuth 1 access token.
196158
public void disableOAuth1AccessToken(DbxOAuth1AccessToken token)
        throws DbxException
    {
        if (token == null) throw new IllegalArgumentException("'token' can't be null");
        DbxRequestUtil.doPostNoAuth(
            requestConfig,
            DbxClientV1.USER_AGENT_ID,
            appInfo.getHost().getApi(),
            "1/disable_access_token",
            null,
            getHeaders(token),
            new DbxRequestUtil.ResponseHandler<Void>() {
                @Override
                public Void handle(HttpRequestor.Response response) throws DbxException {
                    if (response.getStatusCode() != 200) throw DbxRequestUtil.unexpectedStatus(response);
                    return null;
                }
            }
        );
    }
1280886
def disable(self):
        """"""
        self.post("disable")
        if self.service.restart_required:
            self.service.restart(120)
        return self
1329176
def destroy_api_token
    unless current_user
      bounce_user
      return
    end

    api_token = Tokens::Api.where(user_id: current_user.id).first
    if api_token
      api_token.destroy
      respond_to do |format|
        format.html do
          redirect_to api_token_session_url,
                      notice: 'Your old API token has been revoked'
        end
        format.json { render json: {} }
      end
    else
      respond_to do |format|
        format.html do
          redirect_to api_token_session_url,
                      alert: 'You had no old API token to revoke'
        end
        format.json { head :not_found }
      end
    end
  end
207788
def _clear_xauth(self):
        '''
        
        '''
        os.remove(self._xauth_filename)
        for varname in ['AUTHFILE', 'XAUTHORITY']:
            if self._old_xauth[varname] is None:
                del os.environ[varname]
            else:
                os.environ[varname] = self._old_xauth[varname]
        self._old_xauth = None
905724
def revoke_oauth_credential(self):
        """"""
        if self.session.token_type == auth.SERVER_TOKEN_TYPE:
            return

        credential = self.session.oauth2credential
        revoke_access_token(credential)
916424
void revokeUnauthToken(HeaderToken oldToken) {
    synchronized (lock) {
      if (headerCache.getToken() == oldToken) {
        LOG.warn("Got unauthenticated response from server, revoking the current token");
        headerCache = EMPTY_HEADER;
      } else {
        LOG.info("Skipping revoke, since the revoked token has already changed");
      }
    }
  }
315977
def revoke_access_token(self, **kwargs):
        """"""
        c = self.get_credentials()
        data = {
            'client_id': c.client_id,
            'client_secret': c.client_secret,
            'token': c.access_token,
            'token_type_hint': 'access_token'
        }
        r = self._httpclient.request(
            method='POST',
            url=self.token_url,
            json=data,
            path='/api/oauth2/RevokeToken',
            **kwargs
        )
        if not r.ok:
            raise PanCloudError(
                '%s %s: %s' % (r.status_code, r.reason, r.text)
            )
        try:
            r_json = r.json()
        except ValueError as e:
            raise PanCloudError("Invalid JSON: %s" % e)
        else:
            if r.json().get(
                'error_description'
            ) or r.json().get(
                'error'
            ):
                raise PanCloudError(r.text)
            return r_json
6175
def disallow(ctx, foreign_account, permission, threshold, account):
    
    print_tx(
        ctx.bitshares.disallow(
            foreign_account, account=account, permission=permission, threshold=threshold
        )
    )
194083
public function disable() {

        global $wp_filesystem;

        $plugin = $GLOBALS[ 'redisObjectCache' ];

        if ( ! $plugin->object_cache_dropin_exists() ) {

            WP_CLI::error( __( 'No object cache drop-in found.', 'redis-cache' ) );

        } else {

            if ( ! $plugin->validate_object_cache_dropin() ) {

                WP_CLI::error( __( 'An unknown object cache drop-in was found. To use Redis run: wp redis update-dropin.', 'redis-cache' ) );

            } else {

                WP_Filesystem();

                if ( $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' ) ) {
                    WP_CLI::success( __( 'Object cache disabled.', 'redis-cache' ) );
                } else {
                    WP_CLI::error( __( 'Object cache could not be disabled.', 'redis-cache' ) );
                }

            }

        }

    }
249965
public function accessToken(){
		$url = 'https://api.dropbox.com/1/oauth/access_token';
		$result = $this->doOAuthCall($url,'POST');
		parse_str($result['body'], $output);
		if (!count(array_diff(array('oauth_token','oauth_token_secret','uid'),
			array_keys($output))))
		{
			$this->setAuthToken($output['oauth_token'], $output['oauth_token_secret']);
			return $output;
		} else {
			$result = json_decode($result['body'], true);
			trigger_error(sprintf(self::E_AUTHERROR, $result['error']));
			return false;
		}
	}
706552
function cancel(callback) {
    if (!deis._authenticated) {
      return callback(new Error('You need to login first'));
    }

    commons.del(format('/%s/auth/cancel/', deis.version), function() {
      deis.api.logout(callback);
    });
  }
780956
def revoke_auth(self, load):
        '''
        
        '''
        if 'id' not in load:
            return False
        keyapi = salt.key.Key(self.opts)
        keyapi.delete_key(load['id'],
                          preserve_minions=load.get('preserve_minion_cache',
                                                         False))
        return True
1253757
def unprocessable_authorization(exp)
      errors = exp.errors
      if not (errors.nil? or errors.empty?)
        error_hash = errors[0]
        if error_hash[:resource] == 'OauthAccess'
          # error_hash[:code]
          return ask_about_resetting_authorization
        else
          raise exp
        end
      else
        raise exp
      end
    end
35745
def deauth(self):
        
        self.method = None
        self.key = None
        self.last_auth = None

        if self.debug:
            print("Changing auth key and method to None")

        if self.rfid.authed:
            self.rfid.stop_crypto()
            if self.debug:
                print("Stopping crypto1")
1269797
def _disable_access_key(self, force_disable_self=False):
        
        client = self.client
        if self.validate is True:
            return
        else:
            try:
                client.update_access_key(
                    UserName=self._search_user_for_key(),
                    AccessKeyId=self.access_key_id,
                    Status='Inactive'
                )
                logger.info(
                    "Access key {id} has "
                    "been disabled.".format(id=self.access_key_id)
                )
            except Exception as e:
                logger.info(
                    "Access key {id} could not "
                    "be disabled due to: {e}.".format(
                        e=e, id=self.access_key_id
                    )
                )
1313190
function getAccessToken() {
  let token = dropbox.getAccessToken();
  if (!token && window.localStorage) {
    const jsonString = window.localStorage.getItem('dropbox');
    token = jsonString && JSON.parse(jsonString).token;
    if (token) {
      dropbox.setAccessToken(token);
    }
  }

  return (token || '') !== '' ? token : null;
}
956097
@PUT
  @Path("/{path: .*}")
  public void disable(@PathParam("path") String path, @HeaderParam("Authorization") @DefaultValue("no token") String auth) throws Exception {
    sendJGroupsMessage(UpdateOpteration.DISABLE, path, auth);
  }