public class DefaultClientBuilder extends Object implements ClientBuilder
The default ClientBuilder implementation. This looks for configuration files
in the following locations and order of precedence (last one wins).
DEFAULT_CLIENT_API_TOKEN_PROPERTY_NAME, DEFAULT_CLIENT_AUTHENTICATION_SCHEME_PROPERTY_NAME, DEFAULT_CLIENT_AUTHORIZATION_MODE_PROPERTY_NAME, DEFAULT_CLIENT_CACHE_CACHES_PROPERTY_NAME, DEFAULT_CLIENT_CACHE_ENABLED_PROPERTY_NAME, DEFAULT_CLIENT_CACHE_TTI_PROPERTY_NAME, DEFAULT_CLIENT_CACHE_TTL_PROPERTY_NAME, DEFAULT_CLIENT_CONNECTION_TIMEOUT_PROPERTY_NAME, DEFAULT_CLIENT_ID_PROPERTY_NAME, DEFAULT_CLIENT_KID_PROPERTY_NAME, DEFAULT_CLIENT_ORG_URL_PROPERTY_NAME, DEFAULT_CLIENT_PRIVATE_KEY_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_SCOPES_PROPERTY_NAME, DEFAULT_CLIENT_TESTING_DISABLE_HTTPS_CHECK_PROPERTY_NAME| Constructor and Description |
|---|
DefaultClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ApiClient |
build() |
ClientConfiguration |
getClientConfiguration() |
ClientBuilder |
setAuthorizationMode(AuthorizationMode authorizationMode) |
ClientBuilder |
setCacheManager(CacheManager cacheManager) |
ClientBuilder |
setClientCredentials(ClientCredentials clientCredentials) |
ClientBuilder |
setClientId(String clientId) |
ClientBuilder |
setConnectionTimeout(int timeout) |
ClientBuilder |
setKid(String kid) |
ClientBuilder |
setOrgUrl(String baseUrl) |
ClientBuilder |
setPrivateKey(InputStream privateKeyStream) |
ClientBuilder |
setPrivateKey(Path privateKeyPath) |
ClientBuilder |
setPrivateKey(PrivateKey privateKey) |
ClientBuilder |
setPrivateKey(String privateKey) |
ClientBuilder |
setProxy(com.okta.commons.http.config.Proxy proxy) |
ClientBuilder |
setRetryMaxAttempts(int maxAttempts) |
ClientBuilder |
setRetryMaxElapsed(int maxElapsed) |
ClientBuilder |
setScopes(Set<String> scopes) |
public ClientBuilder setProxy(com.okta.commons.http.config.Proxy proxy)
setProxy in interface ClientBuilderpublic ClientBuilder setCacheManager(CacheManager cacheManager)
setCacheManager in interface ClientBuilderpublic ClientBuilder setConnectionTimeout(int timeout)
setConnectionTimeout in interface ClientBuilderpublic ClientBuilder setClientCredentials(ClientCredentials clientCredentials)
setClientCredentials in interface ClientBuilderpublic ClientBuilder setRetryMaxElapsed(int maxElapsed)
setRetryMaxElapsed in interface ClientBuilderpublic ClientBuilder setRetryMaxAttempts(int maxAttempts)
setRetryMaxAttempts in interface ClientBuilderpublic ApiClient build()
build in interface ClientBuilderpublic ClientBuilder setOrgUrl(String baseUrl)
setOrgUrl in interface ClientBuilderpublic ClientBuilder setAuthorizationMode(AuthorizationMode authorizationMode)
setAuthorizationMode in interface ClientBuilderpublic ClientBuilder setScopes(Set<String> scopes)
setScopes in interface ClientBuilderpublic ClientBuilder setPrivateKey(String privateKey)
setPrivateKey in interface ClientBuilderpublic ClientBuilder setPrivateKey(Path privateKeyPath)
setPrivateKey in interface ClientBuilderpublic ClientBuilder setPrivateKey(InputStream privateKeyStream)
setPrivateKey in interface ClientBuilderpublic ClientBuilder setPrivateKey(PrivateKey privateKey)
setPrivateKey in interface ClientBuilderpublic ClientBuilder setClientId(String clientId)
setClientId in interface ClientBuilderpublic ClientBuilder setKid(String kid)
setKid in interface ClientBuilderpublic ClientConfiguration getClientConfiguration()
Copyright © 2017–2023 Okta. All rights reserved.