public Future<ApiKeyData> getApiKeyData(String key) {
        ApiKeyData apiKeyData = keys.get(key);
        if (apiKeyData != null) {
            return Future.succeededFuture(apiKeyData);
        }
        ResourceDescriptor resource = toResource(key);
        return vertx.executeBlocking(() -> ProxyUtil.convertToObject(resourceService.getResource(resource), ApiKeyData.class), false).compose(result -> {
            if (result == null) {
                return Future.failedFuture(new HttpException(HttpStatus.UNAUTHORIZED, "Unknown api key"));
            }
            return Future.succeededFuture(result);
        });
    }
Returns API key data for the given key.

@param key API key could be either project or per request key.
@return the future of data associated with the given key.
server/src/main/java/com/epam/aidial/core/server/security/ApiKeyStore.java