Package org.keycloak.admin.client
Class Keycloak
java.lang.Object
org.keycloak.admin.client.Keycloak
- All Implemented Interfaces:
AutoCloseable
Provides a Keycloak client. By default, this implementation uses a the default RestEasy client builder settings.
To customize the underling client, use a
KeycloakBuilder
to create a Keycloak client.
To read Responses, you can use CreatedResponseUtil
for objects created- Author:
- rodrigo.sasaki@icarros.com.br
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the underlying client.static ResteasyClientProvider
static Keycloak
getInstance
(String serverUrl, String realm, String clientId, String authToken) static Keycloak
static Keycloak
getInstance
(String serverUrl, String realm, String username, String password, String clientId, String clientSecret) static Keycloak
getInstance
(String serverUrl, String realm, String username, String password, String clientId, String clientSecret, SSLContext sslContext) static Keycloak
getInstance
(String serverUrl, String realm, String username, String password, String clientId, String clientSecret, SSLContext sslContext, Object customJacksonProvider) static Keycloak
getInstance
(String serverUrl, String realm, String username, String password, String clientId, String clientSecret, SSLContext sslContext, Object customJacksonProvider, boolean disableTrustManager, String authToken) static Keycloak
getInstance
(String serverUrl, String realm, String username, String password, String clientId, String clientSecret, SSLContext sslContext, Object customJacksonProvider, boolean disableTrustManager, String authToken, String scope) static Keycloak
getInstance
(String serverUrl, String realm, String username, String password, String clientId, SSLContext sslContext) static Keycloak
getInstance
(String serverUrl, String realm, String clientId, String authToken, SSLContext sllSslContext) boolean
isClosed()
<T> T
Create a secure proxy based on an absolute URI.realms()
static void
setClientProvider
(ResteasyClientProvider provider)
-
Method Details
-
setClientProvider
-
getClientProvider
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
realms
-
realm
-
serverInfo
-
tokenManager
-
proxy
Create a secure proxy based on an absolute URI. All set up with appropriate token- Type Parameters:
T
-- Parameters:
proxyClass
-absoluteURI
-- Returns:
-
close
public void close()Closes the underlying client. After calling this method, thisKeycloak
instance cannot be reused.- Specified by:
close
in interfaceAutoCloseable
-
isClosed
public boolean isClosed()- Returns:
- true if the underlying client is closed.
-