How to combine Feign and OAuth 2.0?

I am using Spring Feign and Oauth 2.0

My application has

  • 1 Api Gateway with @ EnableOAuth2Sso
  • 2 Services with @EnableResourceServer

When I call a service api from another service, I get this exception.

feign.FeignException: status 401 reading TestFeign#test(); content:
{"error":"unauthorized","error_description":"Full authentication is required to access this resource"}

How to call api services from another service?

+4
source share

Source: https://habr.com/ru/post/1663045/


All Articles