1

I have a need to transfer the authentication my software received to a backend REST API.

My users are identified using Oauth 2.0 (via Keycloak) using spring security (included in spring boot 2.1.1).

The goal is to transfert that authentication to a backend REST API that will also authenticate the user. I thus need to transfert the access token to that backend.

Up until now I was able to extract the org.keycloak.representations.AccessToken from the request and was able to extract the representation of the access token.

But I am unsure how to insert into in a RestTemplate request i wish to make to the backend.

Also I'm unsure whether that approach is correct or if there is a more "spring-friendly" way :)

Thanks a lot for your help,

vfrans
  • 41
  • 3
  • Duplicate: https://stackoverflow.com/questions/46729203/propagate-http-header-jwt-token-over-services-using-spring-rest-template – vfrans Dec 18 '18 at 05:58

0 Answers0