[keycloak-user] Logging out

Peterson, Dean (MNIT) dean.peterson at state.mn.us
Mon Mar 24 17:52:30 EDT 2014


Ok, that makes sense. I am still trying to figure out how k_logout should work on my end.  I do have the keycloak modules installed on the server running my app.  However, I still get a value of false in logoutApplication:

Response response = client.target(managementUrl).path(AdapterConstants.K_LOGOUT).request().post(Entity.text(token));
boolean success = response.getStatus() == 204;

The success Boolean is false.  I set the Admin url to some path with "admin" but I do not have a REST service at any location for .../admin/.../k_logout.  Am I supposed to do something on my end or should the keycloak modules have automatically set something up that understands how to handle a request to something like .../admin/.../k_logout?

I just would have liked to make all of this a bit easier.  Why can't I create some REST service on my end that calls something like: KeycloakSecurityContext.logout(); Under the covers KeycloakSecurityContext.logout() builds the logout uri, sends the request to the keycloak server and finally logs me out of the local application?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20140324/22238306/attachment.html 


More information about the keycloak-user mailing list