I have to build an application by using microservice architecture. I divided the whole system into multiple components and each component represents a spring boot project. There are several spring boot projects around 6. I have used the eureka server to register all the services for load balancing. A separate Spring boot project has been developed for the web portal and that application contains authentication, authorization with spring security, and JWT protocol. Now I have 7 projects including a web portal and each project has controller classes under the controller's package.
Now I need to know the following things,
SignUp and SignIn request come to the web portal and after signing a JWT token is generated and it is sent to the client but the Authorization part is only available in the SecurityConfig class on the web portal. So should I send all the requests from the client to a component through the web portal each and every time after authenticated?
Client ----------------> Web Portal ------------------>Service/Component
I need to know that can I send a request to another component/service directly like below?
username + password
Client ---------------------------------------> Web Portal
JWT token
Client <-------------------------------------- Web Portal
JWT token
Client ------------------------------------------> Service/Component