Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

How to have a microservice authenticates a user after coming through Zuul gateway?

Posts: 1955
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am practicing with my instructor's code.
I have a @RibbonClient ("currency-exchange-service). Currency exchange service is a secure microservice with basic authentication features (using username/password).
Currency conversion microservice sends a request which goes through my Zuul gateway and then go to currency exchange service.
In the code of conversion service , I have @FeignClient("zuul-gateway-service)

In currency exchange service, I have a basic authentication request interceptor bean to accept the username password read from a properties file.

My problem is the request cannot be authenticated after it goes through the Zuul gateway. I cannot search for a solution.
How can the request be authenticated by the ribbon client, currency exchange after it goes through Zuul.

Here is my code:
currency conversion service:

currency exchange service:

Zuul gateway services that intercepts currency conversion service request:

Eureka service that registers the above services:

Die Fledermaus does not fear such a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic