public class DefaultAuthenticationClientBuilder extends Object implements AuthenticationClientBuilder
The default AuthenticationClientBuilder implementation. This looks for configuration files
in the following locations and order of precedence (last one wins).
DEFAULT_CLIENT_AUTHENTICATION_SCHEME_PROPERTY_NAME, DEFAULT_CLIENT_CONNECTION_TIMEOUT_PROPERTY_NAME, DEFAULT_CLIENT_ORG_URL_PROPERTY_NAME, DEFAULT_CLIENT_PROXY_HOST_PROPERTY_NAME, DEFAULT_CLIENT_PROXY_PASSWORD_PROPERTY_NAME, DEFAULT_CLIENT_PROXY_PORT_PROPERTY_NAME, DEFAULT_CLIENT_PROXY_USERNAME_PROPERTY_NAME, DEFAULT_CLIENT_REQUEST_TIMEOUT_PROPERTY_NAME, DEFAULT_CLIENT_RETRY_MAX_ATTEMPTS_PROPERTY_NAME, DEFAULT_CLIENT_TESTING_DISABLE_HTTPS_CHECK_PROPERTY_NAME| Constructor and Description |
|---|
DefaultAuthenticationClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationClient |
build()
Constructs a new
AuthenticationClient instance based on the AuthenticationClientBuilder's current configuration state. |
AuthenticationClientBuilder |
setBaseUrlResolver(com.okta.sdk.impl.util.BaseUrlResolver baseUrlResolver) |
AuthenticationClientBuilder |
setConnectionTimeout(int timeout)
Sets both the timeout until a connection is established and the socket timeout (i.e.
|
AuthenticationClientBuilder |
setOrgUrl(String baseUrl)
Sets the base URL of the Okta REST API to use.
|
AuthenticationClientBuilder |
setProxy(com.okta.sdk.client.Proxy proxy)
Sets the HTTP proxy to be used when communicating with the Okta API server.
|
AuthenticationClientBuilder |
setRetryMaxAttempts(int maxAttempts)
Sets the maximum number of attempts to retrying before giving up.
|
AuthenticationClientBuilder |
setRetryMaxElapsed(int maxElapsed)
Sets the maximum number of milliseconds to wait when retrying before giving up.
|
public AuthenticationClientBuilder setProxy(com.okta.sdk.client.Proxy proxy)
AuthenticationClientBuilder
Proxy proxy = new Proxy("whatever.domain.com", 443);
AuthenticationClient client = AuthenticationClients.builder().setProxy(proxy).build();
setProxy in interface AuthenticationClientBuilderproxy - the Proxy you need to use.public AuthenticationClientBuilder setConnectionTimeout(int timeout)
AuthenticationClientBuildersetConnectionTimeout in interface AuthenticationClientBuildertimeout - connection and socket timeout in millisecondspublic AuthenticationClientBuilder setBaseUrlResolver(com.okta.sdk.impl.util.BaseUrlResolver baseUrlResolver)
public AuthenticationClientBuilder setRetryMaxElapsed(int maxElapsed)
AuthenticationClientBuildersetRetryMaxElapsed in interface AuthenticationClientBuildermaxElapsed - retry max elapsed duration in millisecondspublic AuthenticationClientBuilder setRetryMaxAttempts(int maxAttempts)
AuthenticationClientBuildersetRetryMaxAttempts in interface AuthenticationClientBuildermaxAttempts - retry max attemptspublic AuthenticationClient build()
AuthenticationClientBuilderAuthenticationClient instance based on the AuthenticationClientBuilder's current configuration state.build in interface AuthenticationClientBuilderAuthenticationClient instance based on the AuthenticationClientBuilder's current configuration state.public AuthenticationClientBuilder setOrgUrl(String baseUrl)
AuthenticationClientBuildersetOrgUrl in interface AuthenticationClientBuilderbaseUrl - the base URL of the Okta REST API to use.Copyright © 2018 Okta. All rights reserved.