private void getUser() { User user = client.getUser("a-user-id"); }
@Override public ClientBuilder setProxy(Proxy proxy) { if (proxy == null) { throw new IllegalArgumentException("proxy argument cannot be null."); } clientConfig.setProxyHost(proxy.getHost()); clientConfig.setProxyPort(proxy.getPort()); clientConfig.setProxyUsername(proxy.getUsername()); clientConfig.setProxyPassword(proxy.getPassword()); return this; }
@Bean protected Client oktaSdkClient() { ClientBuilder builder = Clients.builder() .setCacheManager(oktaSdkCacheManager()) .setAuthenticationScheme(oktaSdkAuthenticationScheme()) .setConnectionTimeout(oktaClientProperties.getConnectionTimeout()) .setClientCredentials(oktaSdkClientCredentials()) .setOrgUrl(oktaClientProperties.getOrgUrl()); Proxy proxy = oktaSdkProxy(); if (proxy != null) { builder.setProxy(oktaSdkProxy()); } return builder.build(); }
private void createClient() { Client client = Clients.builder() .setOrgUrl("{yourOktaDomain}") .setClientCredentials(new TokenClientCredentials("{apiToken}")) .build(); }
public Proxy getProxy() { if (this.proxy != null) { return proxy; } Proxy proxy = null; // use proxy overrides if they're set if ((getProxyPort() > 0 || getProxyHost() != null) && (getProxyUsername() == null || getProxyPassword() == null)) { proxy = new Proxy(getProxyHost(), getProxyPort()); } else if (getProxyUsername() != null && getProxyPassword() != null) { proxy = new Proxy(getProxyHost(), getProxyPort(), getProxyUsername(), getProxyPassword()); } this.proxy = proxy; return this.proxy; }
private void listApplication() { ApplicationList applications = client.listApplications(); }
private void getApplication() { Application app = client.getApplication("appId"); }
@Override public User buildAndCreate(Client client) { return client.createUser(build(client), active, provider); } }
@Override public ClientBuilder setProxy(Proxy proxy) { if (proxy == null) { throw new IllegalArgumentException("proxy argument cannot be null."); } clientConfig.setProxyHost(proxy.getHost()); clientConfig.setProxyPort(proxy.getPort()); clientConfig.setProxyUsername(proxy.getUsername()); clientConfig.setProxyPassword(proxy.getPassword()); return this; }
@Bean protected Client oktaSdkClient() { ClientBuilder builder = Clients.builder() .setCacheManager(oktaSdkCacheManager()) .setAuthenticationScheme(oktaSdkAuthenticationScheme()) .setConnectionTimeout(oktaClientProperties.getConnectionTimeout()) .setClientCredentials(oktaSdkClientCredentials()) .setOrgUrl(oktaClientProperties.getOrgUrl()); Proxy proxy = oktaSdkProxy(); if (proxy != null) { builder.setProxy(oktaSdkProxy()); } return builder.build(); }
private void createClient() { Client client = Clients.builder() .setOrgUrl("{yourOktaDomain}") .setClientCredentials(new TokenClientCredentials("{apiToken}")) .build(); }
public Proxy getProxy() { if (this.proxy != null) { return proxy; } Proxy proxy = null; // use proxy overrides if they're set if ((getProxyPort() > 0 || getProxyHost() != null) && (getProxyUsername() == null || getProxyPassword() == null)) { proxy = new Proxy(getProxyHost(), getProxyPort()); } else if (getProxyUsername() != null && getProxyPassword() != null) { proxy = new Proxy(getProxyHost(), getProxyPort(), getProxyUsername(), getProxyPassword()); } this.proxy = proxy; return this.proxy; }
private void getUser() { User user = client.getUser("a-user-id"); }
private void listApplication() { ApplicationList applications = client.listApplications(); }
private void getApplication() { Application app = client.getApplication("appId"); }
@Override public User buildAndCreate(Client client) { return client.createUser(build(client), active, provider); } }