Currently, I have 2 applications:
users-> capable of crud operations for users. It also has the ability to generate and validate JWTexternal-app-> capable of other operations (e.g. adding 2 numbers)
Both are hosted on a local machine at port 8001 and 8000, respectively. I utilized NGINX to perform a reverse proxy at port 8080.
When I access http://localhost:8080/users/login or any other endpoint from the user service, I can get a cookie and header value. However, I don't know how can I pass that data to the external-app so that I can just validate the token and check if the user is authorized to use it.
P.S. the external-app is accessible publicly in my local machine. I want to change that by adding an authentication (this is where the passing of JWT comes in to authenticate the user).
PPS. Unfortunately, I am unable to post the code here for external-app. That's why I just used the adding of 2 numbers as an example.