public Future<Void> updatePerRequestApiKey(String key, Function<String, String> fn) {
        if (key == null) {
            IllegalArgumentException error = new IllegalArgumentException("Per request API key is undefined");
            log.error("Error occurred at updating api key data: per request API key is undefined");
            return Future.failedFuture(error);
        }
        ResourceDescriptor resource = toResource(key);
        return vertx.executeBlocking(() -> {
            resourceService.computeResource(resource, fn);
            return null;
        }, false);
    }
Assigns a new generated per request key to the {@link ApiKeyData}.
<p>
    Note. The method is blocking and shouldn't be run in the event loop thread.
</p>
server/src/main/java/com/epam/aidial/core/server/security/ApiKeyStore.java