Closes an authorization
 @see https://pay.amazon.com/documentation/apireference/201751630#201752070
 @param amazon_authorization_id [String]
 @optional closure_reason [String]
 @optional merchant_id [String]
 @optional mws_auth_token [String]
332039
def close_authorization(
      amazon_authorization_id,
      closure_reason: nil,
      merchant_id: @merchant_id,
      mws_auth_token: nil
    )

      parameters = {
        'Action' => 'CloseAuthorization',
        'SellerId' => merchant_id,
        'AmazonAuthorizationId' => amazon_authorization_id
      }

      optional = {
        'ClosureReason' => closure_reason,
        'MWSAuthToken' => mws_auth_token
      }

      operation(parameters, optional)
    end
624325
async def close(self) -> None:
        

        LOGGER.debug('HolderProver.close >>>')

        if self.config.get('archive-holder-prover-caches-on-close', False):
            await self.load_cache_for_proof(True)
            ArchivableCaches.purge_archives(self.dir_cache, True)

        await BaseAnchor.close(self)
        for path_rr_id in Tails.links(self._dir_tails):
            rr_id = basename(path_rr_id)
            try:
                await self._sync_revoc_for_proof(rr_id)
            except ClosedPool:
                LOGGER.warning('HolderProver sync-revoc on close required ledger for %s but pool was closed', rr_id)

        LOGGER.debug('HolderProver.close <<<')
1008499
public void terminateWorkflow(String workflowId, String reason) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
        delete(new Object[]{"reason", reason}, "workflow/{workflowId}", workflowId);
    }
1149832
def revoke_authorization(self):
        """"""
        self.request_handler.post(
            endpoint='oauth/token/revoke',
            omit_api_version=True,
            data={
                'client_id': self.auth.client_id,
                'client_secret': self.auth.client_secret,
                'token': self.auth.access_token,
            }
        )
        self.auth.update(
            token_expiration=None,
            access_token=None,
            refresh_token=None,
        )
834998
@Override
  public void close() {
    synchronized (lock) {
      if (closed) {
        return;
      }

      closed = true;
      tokenSource.unregister(this);
      tokenSource = null;
      action = null;
    }
  }
468271
def closed(self, reason):
        '''
        
        '''
        self.logger.debug('结果列表: {}'.format(self.item_list))

        output_strings = json.dumps(self.item_list, ensure_ascii=False)
        with open(self.output_file, 'w') as fh:
            fh.write(output_strings)
1334369
private void cancelDelegationToken() throws HiveSQLException {
    if (delegationTokenStr != null) {
      try {
        Hive.get(getHiveConf()).cancelDelegationToken(delegationTokenStr);
      } catch (HiveException e) {
        throw new HiveSQLException("Couldn't cancel delegation token", e);
      }
      // close the metastore connection created with this delegation token
      Hive.closeCurrent();
    }
  }
855714
public function closeOpenTokens() {
        $lastToken = $this->last();
        while (count($this->openedTokens) > 0) {
            $lastOpenToken = array_pop($this->openedTokens);
            $this->tokens[] = new Token($lastOpenToken . AbstractBlockRule::CLOSE, $lastToken->getPosition());
        }
    }
139812
protected void disableApiKeyInternal(final ObjectId id) {
    final StitchAuthRequest.Builder reqBuilder = new StitchAuthRequest.Builder();
    reqBuilder
            .withMethod(Method.PUT)
            .withPath(routes.getApiKeyDisableRouteForId(id.toHexString()))
            .withRefreshToken();
    getRequestClient().doAuthenticatedRequest(reqBuilder.build());
  }
276722
def handle(self, connection_id, message_content):
        
        LOGGER.warning("Received AuthorizationViolation from %s",
                       connection_id)
        # Close the connection
        endpoint = self._network.connection_id_to_endpoint(connection_id)
        self._network.remove_connection(connection_id)
        self._gossip.remove_temp_endpoint(endpoint)
        return HandlerResult(HandlerStatus.DROP)
720746
private void closeAuthSchemeQuietly(HttpMethod method) {
        AuthScheme scheme = method.getHostAuthState().getAuthScheme();
        if (scheme instanceof Closeable) {
            try {
                ((Closeable) scheme).close();
            } catch (IOException e) {
                log.error("Could not close [" + scheme.getSchemeName() + "] auth scheme", e);
            }
        }
    }
472973
def cancel(id)
      have_key?
      address = @url_private + "/me/cancelchildorder"
      body = {
        "product_code"              => @product_code,
        "child_order_acceptance_id" => id
      }
      h = post_ssl_with_sign(address, body)
      {
        "success" => h
      }
    end
1045618
def close_authenticator(self):
        """"""
        _logger.info("Shutting down CBS session on connection: %r.", self._connection.container_id)
        try:
            _logger.debug("Unlocked CBS to close on connection: %r.", self._connection.container_id)
            self._cbs_auth.destroy()
            _logger.info("Auth closed, destroying session on connection: %r.", self._connection.container_id)
            self._session.destroy()
        finally:
            _logger.info("Finished shutting down CBS session on connection: %r.", self._connection.container_id)
723422
private void handleAuthorizationFailure(Response response, Throwable t, JSONObject extendedInfo) {
        logger.error("authorization process failed");

        if (t != null) {
            t.printStackTrace();
        }

        Iterator<ResponseListener> iterator = authorizationQueue.iterator();

        while(iterator.hasNext()) {
            ResponseListener next = iterator.next();
            next.onFailure(response, t, extendedInfo);
            iterator.remove();
        }
    }
1130120
public void terminateWorkflow(String workflowId, String reason) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
        stub.terminateWorkflow(WorkflowServicePb.TerminateWorkflowRequest.newBuilder()
                .setWorkflowId(workflowId)
                .setReason(reason)
                .build()
        );
    }
237293
def close(self, idempotency_key=None):
        """"""
        url = self.instance_url() + '/close'
        headers = populate_headers(idempotency_key)
        d = self.request('post', url, {}, headers)
        return d.addCallback(self.refresh_from).addCallback(lambda _: self)
16502
@Service
    public void terminateWorkflow(String workflowId, String reason) {
        workflowExecutor.terminateWorkflow(workflowId, reason);
    }