@Test public void testtoProxyOptionsWithoutHostCheckNonPresent() { OidcTenantConfig.Proxy proxy = new OidcTenantConfig.Proxy(); assertFalse(OidcRecorder.toProxyOptions(proxy).isPresent()); }
protected static Optional<ProxyOptions> toProxyOptions(OidcTenantConfig.Proxy proxyConfig) { if (!proxyConfig.host.isPresent()) { return Optional.empty(); } JsonObject jsonOptions = new JsonObject(); jsonOptions.put("host", proxyConfig.host.get()); jsonOptions.put("port", proxyConfig.port); if (proxyConfig.username.isPresent()) { jsonOptions.put("username", proxyConfig.username.get()); } if (proxyConfig.password.isPresent()) { jsonOptions.put("password", proxyConfig.password.get()); } return Optional.of(new ProxyOptions(jsonOptions)); }
OidcRecorder { protected static Optional<ProxyOptions> toProxyOptions(OidcTenantConfig.Proxy proxyConfig) { if (!proxyConfig.host.isPresent()) { return Optional.empty(); } JsonObject jsonOptions = new JsonObject(); jsonOptions.put("host", proxyConfig.host.get()); jsonOptions.put("port", proxyConfig.port); if (proxyConfig.username.isPresent()) { jsonOptions.put("username", proxyConfig.username.get()); } if (proxyConfig.password.isPresent()) { jsonOptions.put("password", proxyConfig.password.get()); } return Optional.of(new ProxyOptions(jsonOptions)); } }
OidcRecorder { protected static Optional<ProxyOptions> toProxyOptions(OidcTenantConfig.Proxy proxyConfig) { if (!proxyConfig.host.isPresent()) { return Optional.empty(); } JsonObject jsonOptions = new JsonObject(); jsonOptions.put("host", proxyConfig.host.get()); jsonOptions.put("port", proxyConfig.port); if (proxyConfig.username.isPresent()) { jsonOptions.put("username", proxyConfig.username.get()); } if (proxyConfig.password.isPresent()) { jsonOptions.put("password", proxyConfig.password.get()); } return Optional.of(new ProxyOptions(jsonOptions)); }  }
OidcRecorder { protected static Optional<ProxyOptions> toProxyOptions(OidcTenantConfig.Proxy proxyConfig) { if (!proxyConfig.host.isPresent()) { return Optional.empty(); } JsonObject jsonOptions = new JsonObject(); jsonOptions.put("host", proxyConfig.host.get()); jsonOptions.put("port", proxyConfig.port); if (proxyConfig.username.isPresent()) { jsonOptions.put("username", proxyConfig.username.get()); } if (proxyConfig.password.isPresent()) { jsonOptions.put("password", proxyConfig.password.get()); } return Optional.of(new ProxyOptions(jsonOptions)); }  Supplier<TenantConfigBean> setup(OidcConfig config, Supplier<Vertx> vertx); void setSecurityEventObserved(boolean isSecurityEventObserved); }
OidcRecorder { protected static Optional<ProxyOptions> toProxyOptions(OidcTenantConfig.Proxy proxyConfig) { if (!proxyConfig.host.isPresent()) { return Optional.empty(); } JsonObject jsonOptions = new JsonObject(); jsonOptions.put("host", proxyConfig.host.get()); jsonOptions.put("port", proxyConfig.port); if (proxyConfig.username.isPresent()) { jsonOptions.put("username", proxyConfig.username.get()); } if (proxyConfig.password.isPresent()) { jsonOptions.put("password", proxyConfig.password.get()); } return Optional.of(new ProxyOptions(jsonOptions)); }  Supplier<TenantConfigBean> setup(OidcConfig config, Supplier<Vertx> vertx); void setSecurityEventObserved(boolean isSecurityEventObserved);  }