public class DefaultHttpClientFactory extends Object implements HttpClientFactory
HttpClientFactory
for HttpClientProvider's
used by Keycloak for outbound HTTP calls.
The constructed clients can be configured via Keycloaks SPI configuration, e.g. standalone.xml, standalone-ha.xml, domain.xml
.
Examples for jboss-cli
/subsystem=keycloak-server/spi=connectionsHttpClient/provider=default:add(enabled=true)
/subsystem=keycloak-server/spi=connectionsHttpClient/provider=default:write-attribute(name=properties.connection-pool-size,value=128)
/subsystem=keycloak-server/spi=connectionsHttpClient/provider=default:write-attribute(name=properties.proxy-mappings,value=[".\*\.(google|googleapis)\\.com;http://www-proxy.acme.corp.com:8080",".\*\.acme\\.corp\\.com;NO_PROXY",".*;http://fallback:8080"])
Constructor and Description |
---|
DefaultHttpClientFactory() |
Modifier and Type | Method and Description |
---|---|
void |
close()
This is called when the server shuts down.
|
HttpClientProvider |
create(KeycloakSession session) |
String |
getId() |
void |
init(Config.Scope config)
Only called once when the factory is first created.
|
void |
postInit(KeycloakSessionFactory factory)
Called after all provider factories have been initialized
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
order
public HttpClientProvider create(KeycloakSession session)
create
in interface ProviderFactory<HttpClientProvider>
public void close()
ProviderFactory
close
in interface ProviderFactory<HttpClientProvider>
public String getId()
getId
in interface ProviderFactory<HttpClientProvider>
public void init(Config.Scope config)
ProviderFactory
init
in interface ProviderFactory<HttpClientProvider>
public void postInit(KeycloakSessionFactory factory)
ProviderFactory
postInit
in interface ProviderFactory<HttpClientProvider>
Copyright © 2021 JBoss by Red Hat. All rights reserved.