Microservice Authentication and Authorization using JWT

Viewed 573

I have created two microservices Let A and B. Every microservice having its own database and its user table for storing username and password. I am maintaining same Signing key for generating key in all microservice.

User of A microservice can access secure api of its microservice easily. But suppose i want to access secure api of B microservice then it will give me error while setting authentication object in spring security context using UserDetailsService because A microservice user is not exist in B microservice User table.

What i have to do for maintaining secure api communication between microservices with JWT Token?

1 Answers
Related