2

I have created MicroService(Spring Boot) App with Jhipster(having gateway + microservice + keycloak) , also configured KeyCloak.

everything is working fine , but i have problem in logout application , When i hit logout API from UI it will only logout from gateway (Not Destroying KeyCloak Session)

Note : Server Not saving any cookies on browser except JSESSIONID

I Need to logout user session from keyCloak.for that i go through below links

Logout user via Keycloak REST API doesn't work

https://www.keycloak.org/docs/3.3/securing_apps/topics/oidc/java/logout.html

As per above links , I need to make POST request to KeyCloak which destroy user active Sessions.for that i call following API

POST http://localhost:8080/auth/realms/<my_realm>/protocol/openid-connect/logout

refer link (LINK answer of @Manh Ha)

I need to add Access Token and Refresh Token in request body , I found Access token from Principal object , But I am struggling to found Refresh Token

Questions :

1) Where i found Refresh token (in spring Boot) ?

Bhagvat Lande
  • 1,392
  • 3
  • 17
  • 34

1 Answers1

4

Support for OIDC Logout was added in JHipster 5.8.0. You can upgrade your JHipster app or copy the code from this PR into your code.

Matt Raible
  • 8,187
  • 9
  • 61
  • 120
  • Thank you very much they have added logout functionality in latest release of Jhipster . I just updated Jhpistor-cli its working in newly created app . Thanks you saved my Day . – Bhagvat Lande Feb 06 '19 at 07:06