Class AdapterConfig
- java.lang.Object
-
- org.keycloak.representations.adapters.config.BaseRealmConfig
-
- org.keycloak.representations.adapters.config.BaseAdapterConfig
-
- org.keycloak.representations.adapters.config.AdapterConfig
-
- All Implemented Interfaces:
AdapterHttpClientConfig
- Direct Known Subclasses:
Configuration
public class AdapterConfig extends BaseAdapterConfig implements AdapterHttpClientConfig
Configuration for Java based adapters- Version:
- $Revision: 1 $
- Author:
- Bill Burke, Brad Culley, John D. Ament
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowAnyHostname
protected boolean
alwaysRefreshToken
protected String
clientKeyPassword
protected String
clientKeystore
protected String
clientKeystorePassword
protected int
connectionPoolSize
protected long
connectionTimeout
protected long
connectionTTL
protected boolean
disableTrustManager
protected boolean
ignoreOAuthQueryParameter
protected int
minTimeBetweenJwksRequests
protected boolean
pkce
protected PolicyEnforcerConfig
policyEnforcerConfig
protected String
principalAttribute
protected String
proxyUrl
The Proxy url to use for requests to the auth-server, configurable via the adapter config propertyproxy-url
.protected int
publicKeyCacheTtl
protected boolean
registerNodeAtStartup
protected int
registerNodePeriod
protected long
socketTimeout
protected String
tokenCookiePath
protected int
tokenMinimumTimeToLive
protected String
tokenStore
protected String
truststore
protected String
truststorePassword
protected Boolean
turnOffChangeSessionIdOnLogin
protected boolean
verifyTokenAudience
-
Fields inherited from class org.keycloak.representations.adapters.config.BaseAdapterConfig
autodetectBearerOnly, bearerOnly, cors, corsAllowedHeaders, corsAllowedMethods, corsExposedHeaders, corsMaxAge, credentials, enableBasicAuth, exposeToken, publicClient, redirectRewriteRules, resource, useResourceRoleMappings
-
Fields inherited from class org.keycloak.representations.adapters.config.BaseRealmConfig
authServerUrl, confidentialPort, realm, realmKey, sslRequired
-
-
Constructor Summary
Constructors Constructor Description AdapterConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClientKeyPassword()
String
getClientKeystore()
Returns keystore with client keys.String
getClientKeystorePassword()
Returns keystore password.int
getConnectionPoolSize()
Returns size of connection pool.long
getConnectionTimeout()
Returns timeout for establishing the connection with the remote host in milliseconds.long
getConnectionTTL()
Returns the connection time-to-liveint
getMinTimeBetweenJwksRequests()
PolicyEnforcerConfig
getPolicyEnforcerConfig()
String
getPrincipalAttribute()
String
getProxyUrl()
Returns URL of HTTP proxy.int
getPublicKeyCacheTtl()
String
getRealmInfoUrl()
int
getRegisterNodePeriod()
long
getSocketTimeout()
Returns timeout for socket waiting for data in milliseconds.String
getTokenCookiePath()
int
getTokenMinimumTimeToLive()
String
getTokenStore()
String
getTruststore()
Returns truststore filename.String
getTruststorePassword()
Returns truststore password.Boolean
getTurnOffChangeSessionIdOnLogin()
boolean
isAllowAnyHostname()
Returns boolean flag whether any hostname verification is done on the server's certificate,true
means that verification is not done.boolean
isAlwaysRefreshToken()
boolean
isDisableTrustManager()
Returns boolean flag whether any trust management and hostname verification is done.boolean
isIgnoreOAuthQueryParameter()
boolean
isPkce()
boolean
isRegisterNodeAtStartup()
boolean
isVerifyTokenAudience()
void
setAllowAnyHostname(boolean allowAnyHostname)
void
setAlwaysRefreshToken(boolean alwaysRefreshToken)
void
setClientKeyPassword(String clientKeyPassword)
void
setClientKeystore(String clientKeystore)
void
setClientKeystorePassword(String clientKeystorePassword)
void
setConnectionPoolSize(int connectionPoolSize)
void
setConnectionTimeout(long connectionTimeout)
void
setConnectionTTL(long connectionTTL)
void
setDisableTrustManager(boolean disableTrustManager)
void
setIgnoreOAuthQueryParameter(boolean ignoreOAuthQueryParameter)
void
setMinTimeBetweenJwksRequests(int minTimeBetweenJwksRequests)
void
setPkce(boolean pkce)
void
setPolicyEnforcerConfig(PolicyEnforcerConfig policyEnforcerConfig)
void
setPrincipalAttribute(String principalAttribute)
void
setProxyUrl(String proxyUrl)
void
setPublicKeyCacheTtl(int publicKeyCacheTtl)
void
setRegisterNodeAtStartup(boolean registerNodeAtStartup)
void
setRegisterNodePeriod(int registerNodePeriod)
void
setSocketTimeout(long socketTimeout)
void
setTokenCookiePath(String tokenCookiePath)
void
setTokenMinimumTimeToLive(int tokenMinimumTimeToLive)
void
setTokenStore(String tokenStore)
void
setTruststore(String truststore)
void
setTruststorePassword(String truststorePassword)
void
setTurnOffChangeSessionIdOnLogin(Boolean turnOffChangeSessionIdOnLogin)
void
setVerifyTokenAudience(boolean verifyTokenAudience)
-
Methods inherited from class org.keycloak.representations.adapters.config.BaseAdapterConfig
getCorsAllowedHeaders, getCorsAllowedMethods, getCorsExposedHeaders, getCorsMaxAge, getCredentials, getRedirectRewriteRules, getResource, isAutodetectBearerOnly, isBearerOnly, isCors, isEnableBasicAuth, isExposeToken, isPublicClient, isUseResourceRoleMappings, setAutodetectBearerOnly, setBearerOnly, setCors, setCorsAllowedHeaders, setCorsAllowedMethods, setCorsExposedHeaders, setCorsMaxAge, setCredentials, setEnableBasicAuth, setExposeToken, setPublicClient, setRedirectRewriteRules, setResource, setUseResourceRoleMappings
-
Methods inherited from class org.keycloak.representations.adapters.config.BaseRealmConfig
getAuthServerUrl, getConfidentialPort, getRealm, getRealmKey, getSslRequired, setAuthServerUrl, setConfidentialPort, setRealm, setRealmKey, setSslRequired
-
-
-
-
Field Detail
-
allowAnyHostname
protected boolean allowAnyHostname
-
disableTrustManager
protected boolean disableTrustManager
-
truststore
protected String truststore
-
truststorePassword
protected String truststorePassword
-
clientKeystore
protected String clientKeystore
-
clientKeystorePassword
protected String clientKeystorePassword
-
clientKeyPassword
protected String clientKeyPassword
-
connectionPoolSize
protected int connectionPoolSize
-
alwaysRefreshToken
protected boolean alwaysRefreshToken
-
registerNodeAtStartup
protected boolean registerNodeAtStartup
-
registerNodePeriod
protected int registerNodePeriod
-
tokenStore
protected String tokenStore
-
tokenCookiePath
protected String tokenCookiePath
-
principalAttribute
protected String principalAttribute
-
turnOffChangeSessionIdOnLogin
protected Boolean turnOffChangeSessionIdOnLogin
-
tokenMinimumTimeToLive
protected int tokenMinimumTimeToLive
-
minTimeBetweenJwksRequests
protected int minTimeBetweenJwksRequests
-
publicKeyCacheTtl
protected int publicKeyCacheTtl
-
policyEnforcerConfig
protected PolicyEnforcerConfig policyEnforcerConfig
-
pkce
protected boolean pkce
-
ignoreOAuthQueryParameter
protected boolean ignoreOAuthQueryParameter
-
verifyTokenAudience
protected boolean verifyTokenAudience
-
socketTimeout
protected long socketTimeout
-
connectionTimeout
protected long connectionTimeout
-
connectionTTL
protected long connectionTTL
-
proxyUrl
protected String proxyUrl
The Proxy url to use for requests to the auth-server, configurable via the adapter config propertyproxy-url
.
-
-
Method Detail
-
isAllowAnyHostname
public boolean isAllowAnyHostname()
Description copied from interface:AdapterHttpClientConfig
Returns boolean flag whether any hostname verification is done on the server's certificate,true
means that verification is not done.- Specified by:
isAllowAnyHostname
in interfaceAdapterHttpClientConfig
- Returns:
-
setAllowAnyHostname
public void setAllowAnyHostname(boolean allowAnyHostname)
-
isDisableTrustManager
public boolean isDisableTrustManager()
Description copied from interface:AdapterHttpClientConfig
Returns boolean flag whether any trust management and hostname verification is done.NOTE Disabling trust manager is a security hole, so only set this option if you cannot or do not want to verify the identity of the host you are communicating with.
- Specified by:
isDisableTrustManager
in interfaceAdapterHttpClientConfig
-
setDisableTrustManager
public void setDisableTrustManager(boolean disableTrustManager)
-
getTruststore
public String getTruststore()
Description copied from interface:AdapterHttpClientConfig
Returns truststore filename.- Specified by:
getTruststore
in interfaceAdapterHttpClientConfig
-
setTruststore
public void setTruststore(String truststore)
-
getTruststorePassword
public String getTruststorePassword()
Description copied from interface:AdapterHttpClientConfig
Returns truststore password.- Specified by:
getTruststorePassword
in interfaceAdapterHttpClientConfig
-
setTruststorePassword
public void setTruststorePassword(String truststorePassword)
-
getClientKeystore
public String getClientKeystore()
Description copied from interface:AdapterHttpClientConfig
Returns keystore with client keys.- Specified by:
getClientKeystore
in interfaceAdapterHttpClientConfig
-
setClientKeystore
public void setClientKeystore(String clientKeystore)
-
getClientKeystorePassword
public String getClientKeystorePassword()
Description copied from interface:AdapterHttpClientConfig
Returns keystore password.- Specified by:
getClientKeystorePassword
in interfaceAdapterHttpClientConfig
-
setClientKeystorePassword
public void setClientKeystorePassword(String clientKeystorePassword)
-
getClientKeyPassword
public String getClientKeyPassword()
-
setClientKeyPassword
public void setClientKeyPassword(String clientKeyPassword)
-
getConnectionPoolSize
public int getConnectionPoolSize()
Description copied from interface:AdapterHttpClientConfig
Returns size of connection pool.- Specified by:
getConnectionPoolSize
in interfaceAdapterHttpClientConfig
-
setConnectionPoolSize
public void setConnectionPoolSize(int connectionPoolSize)
-
isAlwaysRefreshToken
public boolean isAlwaysRefreshToken()
-
setAlwaysRefreshToken
public void setAlwaysRefreshToken(boolean alwaysRefreshToken)
-
isRegisterNodeAtStartup
public boolean isRegisterNodeAtStartup()
-
setRegisterNodeAtStartup
public void setRegisterNodeAtStartup(boolean registerNodeAtStartup)
-
getRegisterNodePeriod
public int getRegisterNodePeriod()
-
setRegisterNodePeriod
public void setRegisterNodePeriod(int registerNodePeriod)
-
getTokenStore
public String getTokenStore()
-
setTokenStore
public void setTokenStore(String tokenStore)
-
getTokenCookiePath
public String getTokenCookiePath()
-
setTokenCookiePath
public void setTokenCookiePath(String tokenCookiePath)
-
getPrincipalAttribute
public String getPrincipalAttribute()
-
setPrincipalAttribute
public void setPrincipalAttribute(String principalAttribute)
-
getTurnOffChangeSessionIdOnLogin
public Boolean getTurnOffChangeSessionIdOnLogin()
-
setTurnOffChangeSessionIdOnLogin
public void setTurnOffChangeSessionIdOnLogin(Boolean turnOffChangeSessionIdOnLogin)
-
getPolicyEnforcerConfig
public PolicyEnforcerConfig getPolicyEnforcerConfig()
-
setPolicyEnforcerConfig
public void setPolicyEnforcerConfig(PolicyEnforcerConfig policyEnforcerConfig)
-
getProxyUrl
public String getProxyUrl()
Description copied from interface:AdapterHttpClientConfig
Returns URL of HTTP proxy.- Specified by:
getProxyUrl
in interfaceAdapterHttpClientConfig
-
setProxyUrl
public void setProxyUrl(String proxyUrl)
-
getTokenMinimumTimeToLive
public int getTokenMinimumTimeToLive()
-
setTokenMinimumTimeToLive
public void setTokenMinimumTimeToLive(int tokenMinimumTimeToLive)
-
getMinTimeBetweenJwksRequests
public int getMinTimeBetweenJwksRequests()
-
setMinTimeBetweenJwksRequests
public void setMinTimeBetweenJwksRequests(int minTimeBetweenJwksRequests)
-
getPublicKeyCacheTtl
public int getPublicKeyCacheTtl()
-
setPublicKeyCacheTtl
public void setPublicKeyCacheTtl(int publicKeyCacheTtl)
-
isPkce
public boolean isPkce()
-
setPkce
public void setPkce(boolean pkce)
-
isIgnoreOAuthQueryParameter
public boolean isIgnoreOAuthQueryParameter()
-
setIgnoreOAuthQueryParameter
public void setIgnoreOAuthQueryParameter(boolean ignoreOAuthQueryParameter)
-
isVerifyTokenAudience
public boolean isVerifyTokenAudience()
-
setVerifyTokenAudience
public void setVerifyTokenAudience(boolean verifyTokenAudience)
-
getSocketTimeout
public long getSocketTimeout()
Description copied from interface:AdapterHttpClientConfig
Returns timeout for socket waiting for data in milliseconds.- Specified by:
getSocketTimeout
in interfaceAdapterHttpClientConfig
-
setSocketTimeout
public void setSocketTimeout(long socketTimeout)
-
getConnectionTimeout
public long getConnectionTimeout()
Description copied from interface:AdapterHttpClientConfig
Returns timeout for establishing the connection with the remote host in milliseconds.- Specified by:
getConnectionTimeout
in interfaceAdapterHttpClientConfig
-
setConnectionTimeout
public void setConnectionTimeout(long connectionTimeout)
-
getConnectionTTL
public long getConnectionTTL()
Description copied from interface:AdapterHttpClientConfig
Returns the connection time-to-live- Specified by:
getConnectionTTL
in interfaceAdapterHttpClientConfig
-
setConnectionTTL
public void setConnectionTTL(long connectionTTL)
-
getRealmInfoUrl
public String getRealmInfoUrl()
-
-