public static String get_trembita_auth_token()

in src/main/java/com/epam/digital/data/platform/el/juel/GetTrembitaAuthTokenJuelFunction.java [50:66]


  public static String get_trembita_auth_token(String registryName) {
    var trembitaConnectionProperties =
        getBean("trembitaExchangeGatewayProperties", TrembitaExchangeGatewayProperties.class);
    return Optional.ofNullable(trembitaConnectionProperties.getRegistries().get(registryName))
        .map(RegistryProperties::getAuth)
        .map(AuthorizationProperties::getSecret)
        .map(AuthorizationProperties.Secret::getToken)
        .orElseThrow(
            () ->
                new TrembitaConfigurationException(
                    SystemErrorDto.builder()
                        .code("CLIENT_ERROR")
                        .message(
                            String.format(
                                "No authorization token for registry %s configured", registryName))
                        .build()));
  }