[keycloak-user] How to use signed JWT to use REST API

Emanuele Gesuato Emanuele.Gesuato at finantix.com
Wed Apr 25 17:08:44 EDT 2018


Hi all,

I know that in keycloak 3.4.2 you can use rest admin api by retrieving a 
token. This token can be retrieved by using:
- username & password
- clientid & client secret
- signed jwt

for instance by using clientid & clientsecret I can connect to keycloak 
host by using the following:

    KeycloakBuilder keycloakBuilder = KeycloakBuilder.builder()
             .serverUrl(AUTH_SERVER)
             .realm(ADMIN_REALM)
             .grantType("client_credentials")
             .clientId("admin-cli")
             .clientSecret("XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
             .grantType("client_credentials") 
             .resteasyClient(client);

My question is how should I use JWT ?

I changed client authenticator in "credentials" tab by selecting "signed 
jwt" but from documentation it is not clear to me how to connect by using 
this kind of authentication method.

thanks for any help
Emanuele



More information about the keycloak-user mailing list