[keycloak-user] Scenario : Java Client (get a token) -> call a Rest service (control token) --> accept/refuse
Charles Moulliard
cmoullia at redhat.com
Fri Oct 7 13:37:48 EDT 2016
Hi,
I would like in a project to perform the following scenario
A Java HTTP Client calls a HTTP Endpoint exposed by WildFly Swarm where the
address URL ("/rest/say") of the endpoint is secured using Keycloak WildFly
plugin (keycloak.json contains the OIC).
In order at the client side to get the OpenID token that I must send next
to the endpoint using "Authentication: Bearer", is it this class that I
must use to get an instance of Keycloak
Keycloak.getInstance("http/localhost:8080/auth",realm, username, password,
clientId)
& next the token to send
Keycloak.tokenManager().grantToken();
?
Class -->
https://github.com/keycloak/keycloak/blob/2.2.1.Final/integration/admin-client/src/main/java/org/keycloak/admin/client/Keycloak.java
Regards
Charles
More information about the keycloak-user
mailing list