title: Keycloak authentication flow in a microservices based environment
body: <p>I want to use Keycloak in a microservices based environment, where authentication is based on OpenID endpoints REST calls  ("/token", no redirection to keycloak login page), a flow that I thought of would be something like this: <br><br>
  1. Front-end SPA retrieves the tokens from the "/token" endpoint and stores in browser's localStorage, then sends it with every request. <br><br>
   2. Gateway-level authentication: Acess Token is passed from the front end to the gateway, gateway consults Keycloak server to check if the token is still valid (not invalidated by a logout end-point call).<br><br>
   3. Micro-service based authorization: Acess Token is passed from the Gateway to the microservices, using Spring Boot adapter the microservices check the signature of the token offline (bearer-only client?) then based on the role in the token do the authorization.<br><br>
  My questions are: Does this flow make sense or can you suggest another flow? What type of Keycloak clients to use? What's an ideal way to pass Tokens using Spring Boot Adapter, and should it be done like that in the first place? Please keep in mind that I am not a Keycloak expert, I've done my research but I still have doubts.</p>