Visit OP_CANCEL_DELEGATION_TOKEN
504974
private void visit_OP_CANCEL_DELEGATION_TOKEN()
    throws IOException {
    visitTxId();
      v.visitByte(       EditsElement.T_VERSION);
      v.visitStringText( EditsElement.T_OWNER);
      v.visitStringText( EditsElement.T_RENEWER);
      v.visitStringText( EditsElement.T_REAL_USER);
      v.visitVLong(      EditsElement.T_ISSUE_DATE);
      v.visitVLong(      EditsElement.T_MAX_DATE);
      v.visitVInt(       EditsElement.T_SEQUENCE_NUMBER);
      v.visitVInt(       EditsElement.T_MASTER_KEY_ID);
  }
510859
def process_request(self, req, resp):  # pylint: disable=unused-argument
        

        if req.path in (self.revoke_endpoint, self.token_endpoint):
            return

        try:
            token = self._get_token(req)
            self.auth_token(token)
        except (AuthRequired, InvalidAuthSyntax) as exc:
            if not self.optional:
                abort(exc)
        except AuthRejected as exc:
            if not self.optional:
                exc.headers = self._get_invalid_token_headers(exc.detail)
                abort(exc)
723756
def revoke_access_token(self):
        

        if not self._access_token:
            return

        self.execute_post('authentication/revoke', json=dict(
            token_type_hint='access_token',
            token=self._access_token
        ))

        self._access_token = None
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)
1000537
def op_token(self, display_name, opt):
        """"""
        args = {
            'lease': opt.lease,
            'display_name': display_name,
            'meta': token_meta(opt)
        }
        try:
            token = self.create_token(**args)
        except (hvac.exceptions.InvalidRequest,
                hvac.exceptions.Forbidden) as vault_exception:
            if vault_exception.errors[0] == 'permission denied':
                emsg = "Permission denied creating operational token"
                raise aomi.exceptions.AomiCredentials(emsg)
            else:
                raise

        LOG.debug("Created operational token with lease of %s", opt.lease)
        return token['auth']['client_token']
326712
def _cancel_callback(self, request_id):
        """"""
        def callback(future):
            if future.cancelled():
                self.notify(CANCEL_METHOD, {'id': request_id})
                future.set_exception(JsonRpcRequestCancelled())
        return callback
223612
def token_delete(remote, token=''):
    
    session_key = token_session_key(remote.name)
    return session.pop(session_key, None)
851088
def available_delegations(self):
        
        api_version = self._get_api_version('available_delegations')
        if api_version == '2018-08-01':
            from .v2018_08_01.operations import AvailableDelegationsOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
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
1226495
def cancel(self, *args, **kwargs):
        
        self._cancel_called = True
        self.clear_waiting_coordinators(cancel=True)
        super(AsperaTransferCoordinatorController, self).cancel(*args, **kwargs)
341221
function endOperation(cm) {
    var op = cm.curOp, group = op.ownsGroup;
    if (!group) return;

    try { fireCallbacksForOps(group); }
    finally {
      operationGroup = null;
      for (var i = 0; i < group.ops.length; i++)
        group.ops[i].cm.curOp = null;
      endOperations(group);
    }
  }
1325273
def revoke(self):
        
        if not self.refresh_token and not self.access_token:
            raise AttributeError('No access/refresh token are defined.')

        if self.refresh_token:
            data = {
                'token_type_hint': 'refresh_token',
                'token': self.refresh_token,
            }
        else:
            data = {
                'token_type_hint': 'access_token',
                'token': self.access_token,
            }

        request_data = self.__prepare_token_request(data, self.oauth_revoke)

        self._session.post(**request_data)
        self.access_token = None
        self.refresh_token = None
        self.token_expiry = None
793331
def cancel(task_id, secret_key=None, url=None):
  """"""
  if not secret_key:
    secret_key = default_key()
  if not url:
    url = default_url()

  url = '%s/cancel' % url
  values = {
    'id': task_id,
  }
  return _send_with_auth(values, secret_key, url)
724709
protected function delegateSignal(VirtualExecution $execution, ?string $signal, array $variables, array $delegation): bool
    {
        if (empty($delegation['nodeId'])) {
            return false;
        }
        
        $node = $execution->getProcessModel()->findNode($delegation['nodeId']);
        
        $execution->getEngine()->debug('Delegating signal <{signal}> to {node}', [
            'signal' => ($signal === null) ? 'null' : $signal,
            'node' => (string) $node
        ]);
        
        $execution->setNode($node);
        $execution->waitForSignal();
        
        $execution->signal($signal, $variables);
        
        return true;
    }
144747
private void cancel(final long globalModVersionOfFailover) {
		executionGraph.getJobMasterMainThreadExecutor().assertRunningInMainThread();
		while (true) {
			JobStatus curStatus = this.state;
			if (curStatus.equals(JobStatus.RUNNING)) {
				if (transitionState(curStatus, JobStatus.CANCELLING)) {

					createTerminationFutureOverAllConnectedVertexes()
						.thenAccept((nullptr) -> allVerticesInTerminalState(globalModVersionOfFailover));
					break;
				}
			} else {
				LOG.info("FailoverRegion {} is {} when cancel.", id, state);
				break;
			}
		}
	}
22471
function toggle_select_token(token) {
          var previous_selected_token = selected_token;

          if(selected_token) {
              deselect_token($(selected_token), POSITION.END);
          }

          if(previous_selected_token === token.get(0)) {
              deselect_token(token, POSITION.END);
          } else {
              select_token(token);
          }
      }
215973
async def deactivate(cls, access_key: str) -> dict:
        '''
        
        '''
        q = 'mutation($access_key: String!, $input: ModifyKeyPairInput!) {' + \
            '  modify_keypair(access_key: $access_key, props: $input) {' \
            '    ok msg' \
            '  }' \
            '}'
        variables = {
            'access_key': access_key,
            'input': {
                'is_active': False,
                'is_admin': None,
                'resource_policy': None,
                'rate_limit': None,
            },
        }
        rqst = Request(cls.session, 'POST', '/admin/graphql')
        rqst.set_json({
            'query': q,
            'variables': variables,
        })
        async with rqst.fetch() as resp:
            data = await resp.json()
            return data['modify_keypair']